SMART datagrid v.1 > Classes > GridView
DataLudi.GridView.getDataIndicesOfRows method
将相当于通过rows参数而指定的行号或网格行对象的数据行索引,返回为数组。
function getDataIndicesOfRows (rows: [Integer|GridRow], all: Boolean): [Integer];
- Returns
- [Integer]
- Parameters
- rows - [Integer|GridRow]. required.
- all - Boolean. 默认值为false.
如果为true,就会将非数据行的行,包含在-1。
Code -1
// 删除被勾选的行。
var rows = grid.getCheckedRows();
rows = grid.getDataIndicesOfRows(rows);
ds.deleteRows(rows);
- See Also
- GridRow
- GridBase.getRowIndexOfDataIndex
- GridBase.getRowIndices
- GridBase.getRowIndicesOfDataIndices