EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: chkaufmann on February 18, 2014, 09:52:26 AM



Title: treegrid - update sort after node update
Post by: chkaufmann on February 18, 2014, 09:52:26 AM
In a treegrid I defined:
    sortName: 'column0',
    remoteSort: false

This works fine when nodes or childnodes are added with the loader function. But when I call:

  tree.treegrid('update', nodedata);

The sort is not updated. I could call 'reload', but this causes a new request to the server which I would like to avoid.

My question: How can I update sorting of all tree nodes?

cu Christian


Title: Re: treegrid - update sort after node update
Post by: stworthy on February 18, 2014, 07:59:50 PM
Please call 'loadData' method to re-sort the rows after update a row data.
Code:
var tg = $('#tg');
var data = tg.treegrid('getData');
tg.treegrid('loadData',data);