Warning: Javascript is disabled; some functionality will be unavailable.
Working with Columns and Rows
Properties:
Width, Height, Visible, Title, DefColWidth, DefRowHeight, Property(Prop_DataType)
Customizing column width
Use the Width property to change the column width:
grid.Column(0).Width = 50
Customizing the row height
Use the Height property to change the row height:
Specifying default sizes
If we add a column or row without explicitly specifying its size, the Grid object will use the default size value:
grid.DefColWidth = 100 grid.DefRowHeight = 20 grid.Cols = 4 grid.Rows = 4
Changing whether the column and row are visible
In order to hide or show a column or row, we use the Visible property:
grid.Column("B").Visible = False grid.Row(2).Visible = False
Changing the column title
Let us change the title of the first column:
grid.Column(0).Title = "Qty"
Specifying the data type
The data type is a hierarchic property. This property exists in the Cell, Column and Grid objects. Changing the data type in the Column object leads to changing of data type in its cells as well:
' Set the "32-bit signed integer" data type
grid.Column("Qty").Property(Prop_DataType) = DataType_I4