EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: itay-g on January 21, 2014, 01:02:45 AM



Title: tree-grid: how to swap rows
Post by: itay-g 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


Title: Re: tree-grid: how to swap rows
Post by: stworthy 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.