EasyUI Forum
April 19, 2024, 02:14:05 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 getData  (Read 12788 times)
hande89
Jr. Member
**
Posts: 56


View Profile
« on: November 25, 2014, 05:59:25 AM »

http://www.jeasyui.com/easyui/demo/treegrid/clientpagination.html

Why does the treegrid return only current page rows when calling getData method if pagination is in use?

Datagrid is returning the whole data: http://www.jeasyui.com/easyui/demo/datagrid/clientpagination.html
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: November 25, 2014, 08:06:52 AM »

Calling 'getData' method on the datagrid returns only the current page rows.
Code:
var d = $('#dg').datagrid('getData');
console.log(d);
Logged
hande89
Jr. Member
**
Posts: 56


View Profile
« Reply #2 on: November 25, 2014, 09:56:06 AM »

But the object returned by datagrid getData has property originalRows, treegrid getData doesn't have it.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: November 26, 2014, 12:41:17 AM »

If you want to get all the loaded rows, please call 'getAllRows' method instead.
Code:
var r1 = $('#dg').datagrid('getAllRows');
var r2 = $('#tg').treegrid('getAllRows');
Logged
hande89
Jr. Member
**
Posts: 56


View Profile
« Reply #4 on: November 26, 2014, 01:21:53 PM »

Ok, but it was undocumented...
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #5 on: November 26, 2014, 03:15:49 PM »

These two examples only show how to achieve the client paging. This is not the core feature.
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!