Page 1 of 1

[INFO REQ] Update with children in Tree Grid

Posted: Sat Apr 09, 2022 7:34 pm
by guillermoxintel

Hello dear friend of TS (tech support), I hope everything is going as expected. Sorry to bug you with a quick question...

For some reason, I was trying to pass new data to my tree grid store, now I have 3 levels, root, children and grandchildren, the problem I see is that when I try to replace one of the root items in my store, only the values on the root are changed, and my children stay the same, so here's my question... is it possible to update children and grandchildren when replacing a root element in the store?

thank you for your help and support.


Re: [INFO REQ] Update with children in Tree Grid

Posted: Sat Apr 09, 2022 8:24 pm
by mats

Yes it should be possible. Can you please post the code you use and show with some image the result vs expected? Would help us get an idea of what to do.


Re: [INFO REQ] Update with children in Tree Grid

Posted: Tue Apr 12, 2022 3:24 pm
by guillermoxintel

Thank you mr Mats, I guess it was a misunderstanding... yes it's updating children also the problem was, we can't see the changes unless we query the store with the .JSON() method (not exactly that name), because if we use store.data we only get the initial, sorry for the confusion.


Re: [INFO REQ] Update with children in Tree Grid

Posted: Tue Apr 12, 2022 4:35 pm
by mats

data is a setter, use records or allRecords property to read records in the store. https://bryntum.com/docs/scheduler/api/Core/data/Store#property-records


Re: [INFO REQ] Update with children in Tree Grid

Posted: Wed Apr 13, 2022 11:12 pm
by guillermoxintel

Awesome, I used the store.toJSON(); and we were looking all around and could not see it... thank you for the info! :-)