DGColumn.EnableColumnMove

Syntax

EnableColumnMove: Boolean;

Description

The EnableColumnMove property determines whether column can be moved.

Comments

Available Values:

Use JSON or the setEnableColumnMove method to set the property value, and the getEnableColumnMove method to get the property value.

Example

To execute the example, the HTML page must contain the DataGrid component named grid (see Example of Creating the DataGrid Component). Get the number of nested columns in the first column:

// Get table dimension
var measure = grid.getMeasures();
// Get the number of nested columns in the first column
console.log("Number of nested columns in the first column: " + measure.getColumns()[0].calculateDepth().columnMax);

As a result the console displays the number of nested columns in the first column:

Number of nested columns in the first column: 1

 

Enable moving of the second column:

var column2 = measure.getColumns()[1];
column2.setEnableColumnMove(true);

Move the second column to the first one. As a result, second column cells are merged with first column cells:

Get the number of additional columns in the first column:

// Get the number of additional columns in the first column
console.log("Number of additional columns in the first column: " + measure.getColumns()[0].getDepth());

As a result the console displays the following information:

Number of additional columns in the first column: 1

See also:

DGColumn