SMART datagrid v.1 > Classes > CheckBar

Back  Forward

DataLudi.CheckBar.checkableExpression  property

Expression which determines Checkable state of Grid Rows

When EditOptions.checkable is true, the user can click only the rows of which Checkable is true to change checked state. CheckBar cells of which rows are not Checkable will be displayed in inactive state. 

If set checkableCallback, this property will be ignored. In the table below, it has listed the variables which can be used in this expression. 

Defaults to null.

Getter
function checkableExpression(): String
Setter
function setCheckableExpression(value: String)
Table-1  CheckBar.checkableExpression variables
VariableExplanation
'values'Get the value as field name or field index of Fields.
'row'Index of row.
'datarow'Data Index of row.
'checked'Checked state of row.
'state'State of data row.
DataRowState.CREATED: 'c', UPDATED: 'u', DELETED: 'd', CREATED_AND_DELETED: 'x'
'count'Number of child rows in the case of Group Row.
'dcount'Number of descendant rows in the case of Group Row.
'tag'Data tag
Code -1
    // Can only check the rows of which salary is greater than 10000 dollars.
    grid.checkBar().setCheckableExpression('values["fldSalary"] > 10000');
Code -2
    grid.setCheckBar({
        'checkableExpression': 'values["fldSalary"] > 10000'
    });
Code -3
    grid.setOptions({
        checkBar: {
            'checkableExpression': 'values["fldSalary"] > 10000'
        }
    });
See Also
checkableCallback
GridBase.isCheckable
GridBase.isChecked
EditOptions.checkable
GridBase.checkBar
Examples
Checkable Expression & Callback
Check Bar