How to refresh(or reload) the xml data in treegrid

How to refresh the tree grid, when I delete, insert, or change the order of the list in the server-side database.
I hope when i refresh the grid, the folder state(expand or close) does not change.
I used loadXML(…). It can reresh the data, but close all the tree nodes, not rember any previous state.
I used updateFromXML(…), but it seems that not fetching data from database, but the bufferred xml.

How to do?
Thanks!

I finally find a solution.

  1. set variable(an array, initially empty) to remember the states of each row.
  2. a function when need to refresh the grid, save the current row state to above-mentioned array.
  3. attach XLE event to the grid. If the variable is empty, do nothing, or you can expand the first level of parent, anything you want. If the variable is not empty, you should openItem or closeItem according to the variable.

If there’s any smarter solution, please follow.

You can save opened state in cookies. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … nipulation

I can’t find these two function in my dhtmlx pro.v2.5
Are they in the latest version?

finally found in dhtmlxgrid_ssc.js and dhtmlxtree_xw.js.
I’ll try them.
Thanx!