Adds a column to the Columns collection of the DataGrid object.
DataGridObject.InsertColumn(ColIndex[, Title][, Type])
Newlook Smartclient
Newlook Server
This method is used to insert an empty column into the data grid.
Note that inserting a column using this method causes the index of every subsequent column and the count property of the columns collection to increment by 1.
ColumnIndex - (Integer, Required)
An integer which specifies where the new column will be inserted. If this argument is 0 then the new column will be inserted as the leftmost column in the DataGrid, if this argument is n then the new column will be inserted to the left of the nth column in the columns collection.
Title - (String, Optional)
String expression displayed in the header row of the column.
Type - (String, Optional)
Integer value specifying the Newlook control Type of the column to be inserted. Cells of the inserted column will be generated as the control type specified. See below for a list of predefined constants that can be used to specify this parameter. If left unspecified this argument defaults to Text Box.
The Type argument may be set to one of the following pre-defined constants:
Returns a Boolean value indicating the success or failure of the action.
The following example adds a column to the columns collection of the datagrid and then populates the column with an image index from an associated image control on the form depending on the text in the adjacent cell: VB SCRIPT:Sub InsertImageColumn
End sub |
InsertColumnArray method | InsertRow method | Clear method | DeleteColumn method | AddRecord method
© 2004-2021 looksoftware. All rights reserved.