SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.setRowHeight  method

Specify the height of data row specified by row

You can use setRowHeights when change the height of multiple rows at the same time. 

Only if do not contain the column group of vertical layout which has more than one child column and DisplayOptions.variableRowHeight is true, the changed value will be reflected on the screen. In addition, if specify DisplayOptions.rowResizable or fixedRowResizable as true, the user can drag the bottom border of row in RowIndicator area with mouse to change the height of an individual row. 

function setRowHeight (row: Integer|GridRow, newHeight: Integer, noRedraw: Boolean): this;
Returns
this
Parameters
row - Integer|GridRow. required.
You can directly specify Row Index or Row Object of integer type.
newHeight - Integer. required.
The height of row. If specify a value which is not a number like undefined, it will be restored as Default Row Height of grid.
noRedraw - Boolean. Defaults to false.
If it is true, it will not draw again immediately after the change. After change the height of multiple rows, it can be used as the way of directly calling refreshView.
Code -1
    var row = grdMain.focusedRow();
    if (row) {
        var h = $('#edtRowHeight').val();
        grid.setRowHeight(row, Math.max(4, Math.min(500, h)));
    }
See Also
setRowHeights
getRowHeight
fitRowHeight
clearRowHeights
DisplayOptions.variableRowHeight
DisplayOptions.rowResizable
DisplayOptions.fixedRowResizable
Examples
Row Heights