EasyUI Forum
May 16, 2024, 05:12:50 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: number of rows in datagrid  (Read 8553 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: January 21, 2013, 07:43:37 AM »

Hi expert;

The easyui document mentioned that the 'data' property of the datagrid is an array object, however, I cannot get the size of this data array by issuing:

var arr = $('#dg').datagrid('options').data;
alert(arr.length); 

How can I achieve the goal?

thx
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #1 on: January 21, 2013, 01:02:17 PM »

This should work
Code:
var arr = $('#dg').datagrid('getRows');
alert(arr.length);
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!