SMART datagrid v.1 > Examples

[ grids ver.1.3.8]   Back  Forward

Tree Data Tag  Example
no-lite

tag of the data row can be used to classify rows by saving the value needed in the application requirements of each row of DataSet. This tag can also be used in dynamic style or filtering in the grid level. 

In the example below, the row of which tag is "#ludi" is drawn in blue background, and the row of which tag is '#data" is drawn in red background. 

Code -1
    tree.loadStyles({
        body: {
            rowDynamic: [{
                expression: "tag == '#ludi'",
                styles: {
                    background: '#200000ff'
                }
            }, {
                expression: "tag == '#data'",
                styles: {
                    background: '#20ff0000'
                }
            }]
        } 
    });

Specify the tag of the selected row as '#ludi'.  Specify the tag of the selected row as '#tag'. 

Specify the tag of the selected rows as '#ludi'.  Specify the tag of the selected rows as '#tag'. 

Remove all the specified tags by calling clearRowTags

Tree - 1
rows

The tag of the data row can also be used in row filtering. 

Display only the rows in which has set Data tag. 

Remove Row Filter. 

 If specify OperateOptions.passiveFiltering as true, even if the top row has been excluded from the filter, it will also be displayed once the included bottom row is remained after filtering. 

View Source JSP 

See Also
DataSet.setRowTag
DataSet.getRowTag
DataSet.setRowTags
DataSet.clearRowTags
GridBase.rowFilter
OperateOptions.passiveFiltering
Tree Overview
Examples
Tree Row Filtering
Tree Filtering