EasyUI Forum
May 20, 2024, 10:16:02 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: tree-grid: how to swap rows  (Read 5037 times)
itay-g
Newbie
*
Posts: 35


View Profile
« on: January 21, 2014, 01:02:45 AM »

Hi,
I'm trying to swap rows location in a treegrid after the data has been loaded. I tried to get the indexes of two rows and switch between them but the getRowIndex method only return -1 in treegrid.
The only way I found it works is to swap the rows in the json and then load the treegrid again.
Is there a better way to do it?

Thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 21, 2014, 01:13:50 AM »

Please use 'find' method to get a row in treegrid. To swap two rows in treegrid, simply call 'update' method on these rows to update their row 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!