EasyUI Forum
May 15, 2024, 03:41:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: How to get the row index of treegrid on: September 19, 2013, 07:23:42 PM
thank you for your code.When rownumbers is set true,it works well,but rownumbers is set false,it still can not get the row index.would you please help me again?
To get the cell value of row number column, try the code below:
Code:
var tg = $('#tg');
var opts = tg.treegrid('options');
var row = tg.treegrid('find', your_row_id);  // find the row by id
var tr = tg.treegrid('options').finder.getTr(tg[0],row[opts.idField]);
var cell = tr.find('div.datagrid-cell-rownumber');
var value = cell.text();
alert(value);
2  General Category / EasyUI for jQuery / How to get the row index of treegrid on: September 17, 2013, 07:17:13 PM
in the API treegrid dependent datagrid, the datagrid has getRowIndex way to get row index. but, in treegrid always used to return -1.
when the Properties rownumbers was set true, how can i get the value of a row number column

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!