DataGrid.MinWidth

Syntax

MinWidth: Number;

Description

The MinWidth property determines minimum table width.

Comments

Use JSON or the setMinWidth method to set the property value and the getMinWidth 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 minimum values of table, columns and rows:

// Check if minimum table widthis calculated by contents
if (grid.getMinWidthByContent()) {
    console.log("Minimum table width is set by a user");
} else {
    console.log("Minimum table width is calculated by contents");
}
// Get minimum table width value
console.log("Minimum table width: " + grid.getMinWidth());
// Get minimum width of table column width
console.log("Minimum value of column width: " + grid.getMinColumnWidth());
// Get minimum value of table row height
console.log("Minimum value of table row height: " + grid.getMinRowHeight());

As a result the console displays the following messages:

Minimum table width is set by a user

Minimum table width: 250

Minimum value of column width: 6

Minimum value of row width: 15

See also:

DataGrid