Applies To        Sample Code Send us your Feedback
Columns Properties Example

The following examples creates four columns in the three different ways. It fills cells with following columns properties: Key, ColIndex, DBIndex, DBField, Caption and Position.
The code below adds columns:


   SGGrid1.DataColCount = 2
   SGGrid1.Columns.Add
   With SGGrid1.Columns.InsertAt(1)
      .Caption = "Inserted"
   End With

Note: When you remove a column, the ColIndex property has changed.

SGGrid1.Columns.Remove 2

Columns Properties Example