Our blazing fast Grid component built with pure JavaScript


Post by kamran812 »

There are 2 things that we need to discuss:
We are using similar Grid system (https://bryntum.com/products/grid/examples/php/) in which we add and modify the records and when needed we save the changes by clicking the save btn. Remove btn is working separately and it doesn't need to save when we remove one or bulk records.

Remove function (creating and then removing that record without refreshing the page) -> not working
because the remove function works on Id's and we don't save id manually it is set on DB level. When we remove the record right after creating it there are dummy id's present in ( remove : (data) => {} ), that's why the error is coming as we are not getting the id's in proper format + not present in DB as well.
We need to refresh the Grid view only on saving the added/ modified records. So that we get the id's from db not from the taskRecord which have dummy id's in format ("_generatedr_82973a0f-65ff-4eaf-9c5a-382ef1ff4b3c").

2nd thing if we add a record and delete it right after creating it without saving (by pressing save button), then simply remove the data from front end there is no need to execute ajax call in this scenario.

Note: we are using remove listener on store level to achieve this.


Post by mats »

Can you please share your code?


Post by kamran812 »

Sure,

Attachments
Screenshot 2023-01-18 145536.png
Screenshot 2023-01-18 145536.png (21.76 KiB) Viewed 342 times
gridcodeforBryntum.zip
(3.27 KiB) Downloaded 25 times

Post by marcio »

Hey kamran812,

Are you able to share a runnable test case with a sample of your data?? There are a few missing libraries, like

$.jqx.dataAdapter

and some PHP tags that are making the example not very easy to debug and run to check the problem and assist you better.

Best regards,
Márcio


Post Reply