EasyUI Forum
May 14, 2024, 03:07:06 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: assigning columns fields in datagrid  (Read 5029 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: January 28, 2015, 07:56:32 AM »

I think of 2 ways to assign column values in datagrid:
(1) method One, assign column with an array variable:

      var fldArr = [[
         {field:'id',title:'id'}
      ]];

      $('#dgtest').datagrid({
         url:"test.php",
         columns: fldArr
      });   

(2) Method Two: assign columns inside the datagrid declaration

      $('#dgtest').datagrid({
         url:"test.php",
         columns:  [[
            {field:'id',title:'id'}
              ]]
      });   

Method One did not work, Method Two succeeded. What's wrong with the variable method?
Logged
eagleeye
Newbie
*
Posts: 19


View Profile Email
« Reply #1 on: January 28, 2015, 12:08:37 PM »

Hi, check this url

http://www.jeasyui.com/forum/index.php?topic=342.0
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!