nasir142
nasir142

Reputation: 83

Save the state Of Expanded Nodes in jqgrid tree Grid

I need to persist the Expanded State Of JQTree Gird.If i reload the whole grid than It Should be retain the old expanded state . Kindly tell me how to do it.

Thanks in Advance

Upvotes: 0

Views: 1584

Answers (1)

Oleg
Oleg

Reputation: 221997

Try the demo which I created for the answer. It seems that it's exact answer on your question.

If you need to load thousands of Node & Subnode you have to load not full TreeGrid at once. You can load expended nodes only. It will reduce the time of loading. The server have to fill loaded property of items which are expended. I recommend you to use postData to send to the server additional information about the nodes which need be expanded (see the answer). It will allows to load only required data from the server.

In my opinion the combination of saving of expanded nodes in localStorage (like in the answer) and loading from the server all expanded nodes (like shortly described in the answer) will bring you to solution of your problem.

Upvotes: 2

Related Questions