How can i reset dataSource from data of service.

Hi, i am trying to make a demo of treegrid for collaborate-editing by websocket. How should i refresh(reset) datasource when data json of server side had be changed.

The virtualization treegrid scrolled to top when I tried to replace directly, how can i stay the scroll status.

Thanks.


1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team June 9, 2022 03:18 PM UTC


Hi Simon Li,


Query#:-The virtualization treegrid scrolled to top when I tried to replace directly, how can i stay the scroll status.


By default, in EJ2 TreeGrid, we have used browser scrollbar to scroll the contents in the treegrid. If we change the dataSource of the Treegrid, the treegird will automatically refresh the contents. So that, the scroller moves to the origin(top) of the scrollbar which is behavior. Basically scrollbar rendered in treegrid after data bounded and based on Treegrid’s width and height.



Regards,

Farveen sulthana T


Loader.
Up arrow icon