EasyUI Forum
September 13, 2025, 09:49:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: What datagrid('getData') returns?  (Read 19110 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: October 24, 2011, 09:24:09 AM »

Hi,

Simple question. See subject.

In case of 'getSelections' it is clear that it will be an array. This also could be checked by colling any array function

Like this:
Code:
var ar = $('#test').datagrid('getSelections');
alert(ar.length);

But the same code with 'getData' shows 'Undefined' instead of number.

So. What do I get from datagrid('getData') and how to work with it?

Thanks.
Logged
dandies
Newbie
*
Posts: 2


View Profile
« Reply #1 on: December 26, 2012, 07:15:23 PM »

The code below will explain your question ..

Code:
var myData = $('#my_datagrid_id').datagrid('getData');
alert('myData : ' + JSON.stringify(myData));
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!