grid.ColumnManager Class
Column manager for grids. Grids will listen to events fired by this component. A column manager is usually created by sending a "columnManager" config object to the constructor of a grid.Grid view.
Constructor
grid.ColumnManager
-
config
Parameters:
-
config
Object
Example:
columnManager:{ columns:{ 'country':{ heading:'Country', removable:false, sortable:true, movable:true, width:200, renderer:function (val) { return '' + val + ''; } }, 'capital':{ heading:'Capital', sortable:true, removable:true, movable:true, width:150 }, population:{ heading:'Population', movable:true, removable:true } } } Is example of a ColumnManager config object sent to a grid. It defines three columns, "country", "capital" and "population". These names corresponds to keys in the data sets. How to configure columns is specified in grid.Column
Item Index
Methods
Properties
Events
Methods
getColumnsInRow
-
rowNumber
Return array of column keys for a header row, 0 is first row
Parameters:
-
rowNumber
Number
Returns:
getGroupFor
-
column
Returns parent group object for a column
Parameters:
-
column
String
Returns:
getGroupIdOf
-
column
Returns id of parent group
Parameters:
-
column
String
Returns:
getVisibleColumns
()
Object
Returns object of visible columns, example:
Returns:
Example:
{
country : {
heading : 'Country'
},
population: {
heading : 'Population'
}
}
insertColumnAfter
-
column
-
after
Insert a column after given column
insertColumnBefore
-
column
-
before
Insert a column before given column
isInAGroup
-
column
Returns true if column with given id is in a group.
Parameters:
-
column
String
Returns:
Properties
Attributes
fill
Boolean
Always fill view, i.e. dynamically increase with of last visible column when total width of visible columns is less than width of the Grid.
Default: true
Events
hidecolumn
Fired when a column is hidden
movecolumn
Fired when a column has been moved
showcolumn
Fired when a column is shown