StyleContext
Description
A StyleContext represents a context and provides contextual information in order to better style the DataGrid, its components and parts.
Style contexts
At this time, the DataGrid supports the following style contexts:
CanvasStyleContextColumnChooserStyleContextColumnHeaderCellStyleContextColumnHeaderRowStyleContextColumnReorderDropMarkStyleContextColumnResizeHandleStyleContextContextMenuStyleContextDataCellStyleContextDataGridStyleContextDataRowStyleContextDraggedColumnHeaderCellStyleContextFilterCellStyleContextFilterEditorElementStyleContextFilterEditorStyleContextFilterRowStyleContextFixedFootersPanelStyleContextFixedHeadersPanelStyleContextFocusSinkStyleContextGroupByPanelElementStyleContextGroupByPanelStyleContextGroupHeaderStyleContextPaginatorStyleContextStatPanelElementStyleContextStatPanelStyleContextTooltipStyleContextViewportStyleContext
Properties
All types of StyleContext share the following properties.
|
Property |
Type |
Description |
|---|---|---|
|
type |
The type of component that the |
|
|
part? |
string |
The key name of the component’s part that the |
The ColumnHeaderCellStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition that is represented by the column header cell. |
The ColumnResizeHandleStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition that is located to the left of the resize handle. |
The DataCellStyleContext contains the following additional properties.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The column that the |
|
|
dataItem |
The data source object associated to the parent row. |
|
|
isCurrent |
boolean |
Indicates if the |
|
isInvalid |
boolean |
Indicates if the |
|
isSelected |
boolean |
Indicates if the |
The DataRowStyleContext contains the following additional properties.
|
Property |
Type |
Description |
|---|---|---|
|
dataItem |
The data source object associated to the row. |
|
|
isSelected |
boolean |
Indicates if the |
|
isAlternate |
boolean |
Indicates if the |
The DraggedColumnHeaderCellStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition that is represented by the column header cell being dragged. |
The FilterCellStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition that is associated to the filter cell. |
The FilterEditorElementStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition that is associated to the filter editor element. |
The FilterEditorStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition on which the filter editor can define a filter. |
The FocusSinkStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
location |
Indicates if the |
The GroupByPanelElementStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
columnDefinition |
The columnDefinition that is grouped and is associated to the group by element. |
The GroupHeaderStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
groupPath |
An array representing the path that identifies the group (e.g. Canada, Montreal). |
The StatPanelElementStyleContext contains the following additional properties.
|
Property |
Type |
Description |
|---|---|---|
|
field |
string |
The name of the field on data source objects. |
|
groupPath |
An array representing the path that identifies the group (e.g. Canada, Montreal) on which to display a statistic. |
|
|
statConfiguration |
The configuration used to display the statistic. |
|
|
statResult |
The result of the statistical calculation. |
The StatPanelStyleContext contains the following additional property.
|
Property |
Type |
Description |
|---|---|---|
|
groupPath |
An array representing the path that identifies the group (e.g. Canada, Montreal) on which to display a statistic. |