EasyUI Forum
May 21, 2024, 04:22:19 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: treegrid - update sort after node update  (Read 5660 times)
chkaufmann
Newbie
*
Posts: 15


View Profile Email
« 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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);
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!