SMART datagrid v.1 > Classes > CellIndex

Back  Forward

DataLudi.CellIndex.normalize  method

调整值,以便该CellIndex可以指定有效的位置。 

重新进行设置,以便在rowIndex大于0并小于GridBase.rowCount,并且columnnull时,使之成为显示在网格上的第一个列。 

function normalize (gird: GridView): CellIndex;
Returns
CellIndex
Parameters
gird - GridView. required.
网格对象。
Code -1
    $('#focus').click(function () {
        var index = grid.focusedIndex();
        if (!grid.isValidCell(index)) {
            index.normalize();
            grid.setFocusedIndex(index);
        }
    })
See Also
rowIndex
column
getRow
getValue
GridRow
GridColumn
Examples
聚焦单元格