GridSubGrids
Mixin
Mixin for grid that handles SubGrids. Each SubGrid is scrollable horizontally separately from the other SubGrids. Having two SubGrids allows you to achieve what is usually called locked or frozen columns.
By default a Grid has two SubGrids, one named 'locked' and one 'normal'. The locked region has fixed width, while the normal region grows to fill all available width (flex).
Which SubGrid a column belongs to is determined using its region config. For example to put a column into the locked region, specify { region: 'locked' }. For convenience, a column can be put in the locked region using { locked: true }.
new Grid({
columns : [
// These two columns both end up in the "locked" region
{ field: 'name', text: 'Name', locked: true }
{ field: 'age', text: 'Age', region: 'locked' }
]
});
To customize the SubGrids, use subGridConfigs:
// change the predefined subgrids
new Grid({
subGridConfigs : {
locked : { flex : 1 } ,
normal : { flex : 3 }
}
})
// or define your own entirely
new Grid({
subGridConfigs : {
a : { width : 150 } ,
b : { flex : 1 },
c : { width : 150 }
},
columns : [
{ field : 'name', text : 'Name', region : 'a' },
...
]
})
See also
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of GridSubGrids class, or subclass thereof.
-
An object containing the SubGrid region instances, indexed by subGrid id ('locked', normal'...)
-
Identifies an object as an instance of GridSubGrids class, or subclass thereof.