SMART datagrid v.1 > Examples

Back  Forward

Check Cell Renderer  Example

If specify the renderer type as "check" during setting the columns, CheckCellRenderer object will be used to draw the corresponding column cells. Check renderer displays the check mark and text together. Also, the check renderer is an editable renderer which can modify the cell value by clicking the mouse or typing space key if specify CheckCellRenderer.editable as true

If threeState is true, the check mark will display three states including undefined, otherwise, it will display false and true states only. Please refer to CheckCellRenderer help topic about the display location and color, etc. 

In the grid below, "Field1" has set threeStates as true and enabled space key to work. Since editable of the column has been set as false, the cell editor will not be displayed in it. Also, since editOnClick has been specified as true, even if the focus is not in the cell, the cell value will be modified once it is clicked. space key has been enabled as well. 

"Field2" has enabled to display only two values, and also enabled to display the cell editor. Since it has set GridStyles.shapeSize value as "130%", the check mark is displayed in a larger size. 

As "Field4" is BOOLEAN field from the beginning, it has not specified trueValues and falseValues properties. "Field3" and "Field4" have changed the location of the check mark through GridStyles.iconLocation property. 

Grid - 1
rows

View Source JSP 

See Also
CheckCellRenderer