Columns in the the dbicList control are objects of the type Dbi.WinControl.dbiColumnItem and are stored in the dbicList control’s Columns collection. Columns can be added/edited/deleted in design-time using the Columns designer built in to the control. The Columns designer is accessed by using the Edit Columns selection in the dbicList Tasks menu (click on the arrow in the upper right hand corner of the control when it is selected in the design surface) or by clicking the ellipse button (…) in the Columns item in the property inspector for the control. Columns can also be added or modified at runtime programmatically by interacting with the control’s Columns collection’s dbiColumnItem objects.
Example:
VB.NET
'Create a new Column Item
Dim dbicListColumn As New Dbi.WinControl.dbiColumnItem
'Set the column type to text
dbicListColumn.DataType = Dbi.WinControl.enumDataType.Text
'Set the header text for the column
dbicListColumn.Text = "New Text Column"
'Set the column width
dbicListColumn.Width = 200
'Set the background of the column header to a vertical gradient fill (White to Gray)
dbicListColumn.BackColor = Color.White
dbicListColumn.BackColorTo = Color.Gray
dbicListColumn.FillType = Dbi.enumFillType.Vertical
'Add the new column to the dbicList's column collection
Me.dbicList1.Columns.Add(dbicListColumn)
C#
//Create a new Column Item
Dbi.WinControl.dbiColumnItem dbicListColumn = new Dbi.WinControl.dbiColumnItem();
//Set the column type to text
dbicListColumn.DataType = Dbi.WinControl.enumDataType.Text;
//Set the header text for the column
dbicListColumn.Text = "New Text Column";
//Set the column width
dbicListColumn.Width = 200;
//Set the background of the column header to a vertical gradient fill (White to Gray)
dbicListColumn.BackColor = Color.White;
dbicListColumn.BackColorTo = Color.Gray;
dbicListColumn.FillType = Dbi.enumFillType.Vertical;
//Add the new column to the dbicList's column collection
this.dbicList1.Columns.Add(dbicListColumn);
NOTE: The Columns collection of the dbicList control is also persisted through the control’s XML Read/Write functionality. Accordingly, column collections for a variety of list configurations can be stored as XML files and retrieved at design time or at runtime using the XML functionality built into the control.