SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onDataCellClicked  event

当使用鼠标而点击数据单元格时,将会触发这个事件。 

当在相同的单元格中,依次运行mouse down和up时,将会触发这个事件。 如果在不同的单元格中,运行down和up,就不会触发这个事件。 如果在数据单元格中,运行mouse down,首先会触发onDataCellClick事件。 

function onDataCellClicked (grid: GridBase, index: CellIndex);
Returns
Void
Parameters
grid - GridBase.
index - CellIndex.
Code -1
    grid.onDataCellClicked = function (grid, index) {
        if (index && index.dataColumn() && index.getDataIndex(grid) >= 0) {
            alert(ds.getValue(index.getDataIndex(grid), index.dataField()));
        }
    };
See Also
onDataCellDblClicked
onDataCellClick
onCurrentChanging
onCurrentChanged
Examples
Hello Grid
聚焦单元格