TabSheetSettings.ColumnWidth

Syntax

ColumnWidth: Number

Description

The ColumnWidth property determines width of specified table column.

Comments

Use the setColumnWidth method to set the property value, and the getColumnWidth method to get the property value. Property value cannot be set from JSON.

Two parameters must be specified on calling the setColumnWidth method: value - new value of the column width, and colIndex - index of the column for which the width is set.

On calling the getColumnWidth method specify the colIndex parameter: - index of the table column for which you want to get the width value.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see. Example of Creating the TabSheet Component). Change width of the first three table columns:

// Process the RowColumnSizeChanged event
tabSheet.RowColumnSizeChanged.add(
    function(sender, args) {
        console.log("Index column width " + args.colIndexes[0] + ": " + args.newValue);
    }
);
// Change values of table column width
tabSheet.setColumnWidth(85, 0);
tabSheet.setColumnWidth(50, 1);
tabSheet.setColumnWidth(40, 2);

After executing the example width of the three first table columns is changed:

After firing the  RowColumnSizeChanged event the browser console shows column width values:

Width of column with the index 0: 85
Width of column with the index 1: 50
Width of column with the index 2: 40

See also:

TabSheetSettings