SMART datagrid v.1 > Classes > ColumnGroup

Back  Forward

DataLudi.ColumnGroup.setChildIndex  method

如果通过参数column而指定的被包含在这个列组,并且列的GridColumn.index不同于参数newIndex, 就会将列移动至newIndex位置。 可以通过setVisibleIndex,变更显示位置。 

function setChildIndex (column: GridColumn, newIndex: Integer);
Returns
Void
Parameters
column - GridColumn. required.
newIndex - Integer. required.
Code -1
    var col = grid.focusedIndex().columm();
    if (col && col.group()) {
        col.group().setChildIndex(col, col.index() + 1);
    }
See Also
setVisibleIndex
GridColumn.index
GridColumn.displayIndex
Examples
列分组