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.
Style | Explanation |
---|---|
styleCallback | Callback 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. |
CellStyle | You can specify the style properties in each data cell through GridBase.setCellStyle, etc. |
DataColumn.dynamicStyles | Dynamic Style collection being specified in each column. |
GridBody.cellDynamicStyles | Dynamic Style collection which should be applied in all columns. If specify ValueColumn.ignoreDefaultDynamicStyles as true, this dynamic style will be ignored. |
GridBody.rowDynamicStyles | Dynamic Style collection which should be applied in each row. If specify ValueColumn.ignoreRowDynamicStyles as true, this dynamic style will be ignored. |
GridColumn.styles | Basic Style Set being set in each column. |
Style | Explanation |
---|---|
GridBody.rowStyles | Basic Style Set basically being applied when rendering data rows. |
GridBody.rowRangeStyles | Style 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.