SMART datagrid v.1 > Classes > CheckBar

[ grids ver.1.3.0]   Back  Forward

DataLudi.CheckBar.checkableCallback  property

Callback function which determines Checkable state of Grid Rows

function (grid: GridBase, row: GridRow):Boolean;

The user can click the rows which return true from this callback with mouse to change checked state. CheckBar cells of which rows are not Checkable will be displayed in inactive state. If set this property, checkableExpression expression will be ignored. 

Defaults to null.

Getter
function checkableCallback(): Function
Setter
function setCheckableCallback(value: Function)
Code -1
    // Can only check the rows of which salary is greater than 10000 dollars.
    grid.checkBar().setCheckableCallback(function (grid, row) {
        return row.getValue("salary") > 10000;
    });
Code -2
    grid.setCheckBar({
        'checkableExpression': function (grid, row) {
            return row.getValue("salary") > 10000;
        }
    });
Code -3
    grid.setOptions({
        checkBar: {
            'checkableExpression': function (grid, row) {
                return row.getValue("salary") > 10000;
            }
        }
    });
See Also
checkableExpression
GridBase.isCheckable
GridBase.isChecked
EditOptions.checkable
GridBase.checkBar
Examples
Checkable Expression & Callback
Check Bar