SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.button  property

The type of buttons which will be displayed on the right side of data cell. 

It specifies by CellButton constant. Button display mode is specified by buttonVisibility property. If click the button during run time, GridBase.onCellButtonClicked event will be fired. 

Defaults to CellButton.NONE.

Getter
function button(): CellButton
Setter
function setButton(value: CellButton)
Code -1
    var columns = [{
        fieldName: "fldAddr",
        button: DataLudi.CellButton.ACTION,
        buttonVisibility: DataLudi.ButtonVisibility.ALWAYS
    },
    ...
    ];
    grid.setColumns(columns);
    
    // If column button is ACTION, it will be fired when click the button.
    grid.onCellButtonClicked = function (grid, index) {
        if (index.column.fieldName() == 'fldAddr') {
            alert('good!');
        }
    }
See Also
buttonVisibility
CellButton
GridBase.onCellButtonClicked
Examples
Column Popup Menu
Data Cell Buttons