InsertColumn Method

Adds a column to the Columns collection of the DataGrid object.

DataGridObject.InsertColumn(ColIndex[, Title][, Type])

Client support

   Newlook Smartclient

   Newlook Server

Use

This method is used to insert an empty column into the data grid.

WARNING!

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.

Arguments

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.

Constants

The Type argument may be set to one of the following pre-defined constants:

Returns

Returns a Boolean value indicating the success or failure of the action.

Applies To

DataGrid control

See Also

InsertColumnArray method | InsertRow method | Clear method | DeleteColumn method | AddRecord method


© 2004-2021 looksoftware. All rights reserved.