Our blazing fast Grid component built with pure JavaScript


Post by KelvinLB »

Here is an example
What I want is to be able to send all my tree that is selected with the add button

Attachments
prueba.PNG
prueba.PNG (31.33 KiB) Viewed 1052 times

Post by mats »

Easy:

const selection = grid1.store.remove(grid1.selectedRecords);
grid2.store.add(selection)

Post by KelvinLB »

implement the code but I get an empty array,
And reviewing the reference I realized that in my BryntumGrid component I don't have the direct method, does it have to be configured somewhere to be able to activate it?

I attach the Json with the components that the reference shows me

Attachments
json.PNG
json.PNG (96.13 KiB) Viewed 1047 times

Post by mats »

implement the code but I get an empty array,

Please show how us how you implemented this.


Post by KelvinLB »

I could already obtain the selected values, only that when he sends them he does it in the form of an arrangement, and I understand that because by storing everything that is selected, I think that from there I will start to be able to assemble the tree again.


Post by pmiklashevich »

Please see gridInstance on the screenshot you attached. It has the API Mats mentioned earlier. Please learn this guide: https://www.bryntum.com/docs/grid/#guides/integration/react.md#accessing-the-grid-engine

Also please check out how to ask for help: viewtopic.php?f=35&t=772
To create a testcase you can always modify one of our demos, zip it up and attach here.

Cheers!

Pavlo Miklashevych
Sr. Frontend Developer


Post by KelvinLB »

Thank you very much already solved the problem.
The solution was to search the instance and from there delete my data.

const selection = inputRef.current.gridInstance.store.remove(inputRef.current.gridInstance.selectedRecords);

I leave attached the code that I use to be able to eliminate the selected data in my main grid


Post Reply