SMART datagrid v.1 > Classes

Back  Forward

abstract DataLudi.GridColumn  class

管理对网格的所有行中,显示在同一位置的单元格的共同属性的模型。 

列大致上可分为继承ValueColumn的模型和ColumnGroup对象。 ValueColumn的单元格将会通过DataField,显示连接在网格上的DataSet的值,并且将用户所输入的值,重新传递至数据组。 或者,也可以显示从数据字段的值而衍生的值或固定文本。 列组可以通过水平或垂直布置子列,构成多种形式的单元格布局。 

因为当通过调用GridBase.setColumns而设置网格列模型时,网格列对象将会传递至JSON设置对象, 并且将会自动创建在网格内部,所以几乎无需直接创建列对象。 

Base Classes
DLBase
Inherited Classes
ColumnGroup, ValueColumn
Constructor
function GridColumn (config: Object);
Properties
checked
dataRoot
displayIndex
displayText
distance
fillHeight
fixed
footer
grid
group
groupFooter
header
height
index
isDataRoot
isFixed
isRoot
movable
name
parent
resizable
root
styleName
styles
tag
visible
width
Inherited Methods
DLBase.assign
DLBase.getProperties
DLBase.getProperty
DLBase.setProperties
DLBase.setProperty
DLBase.toggle

 

Code -1
    grid.setColumns([{
        name: 'colName',
        fieldName: 'name'
    }, {
        type: 'group',
        layout: 'vertical',
        columns: [
        ]
    },
    ...
    ]);
See Also
GridBase
GridRow
DataSet
DataField
Examples
HelloGrid
列分组