EasyUI Forum
May 05, 2024, 10:32:48 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: Please explain the nested arrays in datagrid columns  (Read 11911 times)
pacific202
Newbie
*
Posts: 35


View Profile
« on: November 16, 2011, 10:23:09 PM »

The DataGrid documentation describes the Columns parameter as follows:

Quote
The DataGrid Columns is an array object, which element is an array too. The element of element array is a config object, which defines every column field.

Is there another way to describe this?  I'm having difficulty understanding why it's a nested array construct.

What sort of grid does the example in the documentation produce?  Does this have something to do with the expanded rows feature?

Code:
columns:[[  
    {field:'itemid',title:'Item ID',rowspan:2,width:80,sortable:true}, 
    {field:'productid',title:'Product ID',rowspan:2,width:80,sortable:true}, 
    {title:'Item Details',colspan:4} 
],[ 
    {field:'listprice',title:'List Price',width:80,align:'right',sortable:true}, 
    {field:'unitcost',title:'Unit Cost',width:80,align:'right',sortable:true}, 
    {field:'attr1',title:'Attribute',width:100}, 
    {field:'status',title:'Status',width:60} 
]] 
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!