SMART datagrid v.1 > Concepts

Back  Forward

Concepts.Dynamic Styles Overview

The value being displayed in the grid data cell is not fixed text or number but dynamic value added and updated during the run time. So, if you want to distinguish cell background, text color or other display style based on the value, you may need other way besides Static Style property being specified by each column. 

Currently, when SMART datagrid is rendering one data cell, it will search the necessary property value according to the priority order listed in the table below so as to implement style properties which will be transferred to cell renderer. In other words, before using the style values specified in Column Style including the data cell, it will use Style Values specified in the dynamic style of a few steps first. 

The most preferentially used ones will be the styles set through DataColumn.styleCallback which is specified in each column and the style values specified in CellStyle which can be specified in each data cell. 

Table-1  Dynamic Styles
StyleExplanation
styleCallbackCallback function which can be specified in each column. It will transfer cell location and Style Object. You can change the style values fixed through the styles below within this function lastly.
CellStyleYou can specify the style properties in each data cell through GridBase.setCellStyle, etc.
DataColumn.dynamicStylesDynamic Style collection being specified in each column.
GridBody.cellDynamicStylesDynamic Style collection which should be applied in all columns.
If specify ValueColumn.ignoreDefaultDynamicStyles as true, this dynamic style will be ignored.
GridBody.rowDynamicStylesDynamic Style collection which should be applied in each row.
If specify ValueColumn.ignoreRowDynamicStyles as true, this dynamic style will be ignored.
GridColumn.stylesBasic Style Set being set in each column.
Table-2  Row Styles
StyleExplanation
GridBody.rowStylesBasic Style Set basically being applied when rendering data rows.
GridBody.rowRangeStylesStyle Set being applied to data rows which belong to the specific data row or range.

Please refer to each dynamic style help topic about the details. 

See Also
GridStyles
DynamicStyle
GridColumn.styles
DataColumn.styleCallback
DataColumn.dynamicStyles
GridBody.cellDynamicStyles
GridBody.rowDynamicStyles
GridBody.rowStyles
GridBody.rowRangeStyles
CellStyle
GridBase.setCellStyle
Examples
Column Dynamic Styles
Default Dynamic Styles
Row Styles
Cell Styles