Advanced User Interface Controls and Components
Specifies an object that holds a style which determines the appearance of all parts of the Grid.
An Object which contains all style settings in Grid directive.
controlStyle = {
general: 'iui-grid',
column: {
general: {
content: 'iui-grid-column-cell-content',
disabled: 'iui-grid-column-disabled',
normal: 'iui-grid-column',
hovered: 'iui-grid-column-hovered',
selected: 'iui-grid-column-selected'
},
header: {
content: 'iui-grid-column-header-cell-content',
disabled: 'iui-grid-column-header-disabled',
normal: 'iui-grid-column-header',
hovered: 'iui-grid-column-header-hovered',
selected: 'iui-grid-column-header-selected'
},
body: {
content: 'iui-grid-column-body-cell-content',
disabled: 'iui-grid-column-body-disabled',
normal: 'iui-grid-column-body',
hovered: 'iui-grid-column-body-hovered',
selected: 'iui-grid-column-body-selected'
},
footer: {
content: 'iui-grid-column-footer-cell-content',
disabled: 'iui-grid-column-footer-disabled',
normal: 'iui-grid-column-footer',
hovered: 'iui-grid-column-footer-hovered',
selected: 'iui-grid-column-footer-selected'
}
},
row: {
general: {
disabled: 'iui-grid-row-disabled',
focused: 'iui-grid-row-focused',
normal: 'iui-grid-row',
hovered: 'iui-grid-row-hovered',
selected: 'iui-grid-row-selected'
},
checkBox: {
general: 'iui-checkbox',
box: {
general: 'iui-checkbox-box',
disabled: 'iui-checkbox-box-disabled',
checked: 'iui-checkbox-checked',
indeterminate: 'iui-checkbox-indeterminate',
unchecked: 'iui-checkbox-unchecked'
}
},
expandBox: {
general: 'iui-grid-expand-box',
animated: 'iui-grid-expand-box-load',
expanded: 'iui-grid-expand-box-open',
collapsed: 'iui-grid-expand-box-close'
},
cell: {
content: 'iui-grid-row-cell-content',
general: 'iui-grid-row-cell',
disabled: 'iui-grid-row-cell-disabled',
focused: 'iui-grid-row-cell-focused',
normal: 'iui-grid-row-cell',
hovered: 'iui-grid-row-cell-hovered',
selected: 'iui-grid-row-cell-selected'
}
},
cell: {
content: 'iui-grid-row-cell-content',
general: 'iui-grid-row-cell',
disabled: 'iui-grid-row-cell-disabled',
focused: 'iui-grid-row-cell-focused',
normal: 'iui-grid-row-cell',
hovered: 'iui-grid-row-cell-hovered',
selected: 'iui-grid-row-cell-selected'
}
}
This property is accessed through 'control-style' attribute of TreeView directive
You can use this property to change the appearance of the Grid dynamically from code. By simply setting custom CSS classes in your app code and apply the name of the class to some of above style fields, you can override the default appearance of the Grid.
Supported in: v2.0.
An example of AngularJS Grid with rows displayed in alternate colors.
A demonstration on how to change the appearance of individual cell in the Grid.
A demonstration on how to change the appearance of columns.