'Declaration Public ReadOnly Property Columns As ListColumnCollection
'Usage Dim instance As GcListBox Dim value As ListColumnCollection value = instance.Columns
public ListColumnCollection Columns {get;}
'Declaration Public ReadOnly Property Columns As ListColumnCollection
'Usage Dim instance As GcListBox Dim value As ListColumnCollection value = instance.Columns
public ListColumnCollection Columns {get;}
Use the Columns collection to add columns, remove columns, or update properties on the columns.
Each column in the Columns collection defines a column in the GcListBox. Columns in the collection must derive from GrapeCity.Windows.InputMan.ListColumn.
The following table lists the three defined column types that the GcListBox provides.
Column type |
Data type |
---|---|
Used to display text. |
|
Used to display Boolean data. |
|
Used to display image. |
In addition, you can define your own custom column by using GrapeCity.Windows.InputMan.ListTemplateColumn. If you set ListItem to System.Windows.Controls.ItemsControl.Items or System.Windows.Controls.ItemsControl.ItemsSource, the GrapeCity.Windows.InputMan.ListSubItemColumn is used to display SubItem customized in ListItem.SubItems. You can modify the Columns collection at run time regardless of whether it contains generated columns. However, if you specify columns in XAML, you should not set GrapeCity.Windows.InputMan.GcListBox.AutoGenerateColumns to true.
You cannot add a column to the Columns collection of more than one GrapeCity.Windows.InputMan.GcListBox. If you try to do this, an System.InvalidOperationException will be thrown.