GrapeCity.Win.MultiRow Namespace > ComboBoxCell Class : Items Property |
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.ListCellStringCollectionEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <SRCategoryAttribute("Data")> <SRDescriptionAttribute("Indicates the items in the Cell.")> <MergablePropertyAttribute(False)> <LocalizableAttribute(True)> <DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)> Public ReadOnly Property Items As ComboBoxCell.ObjectCollection
Dim instance As ComboBoxCell Dim value As ComboBoxCell.ObjectCollection value = instance.Items
[Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.ListCellStringCollectionEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [SRCategory("Data")] [SRDescription("Indicates the items in the Cell.")] [MergableProperty(false)] [Localizable(true)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ComboBoxCell.ObjectCollection Items {get;}
This property enables you to obtain a reference to the list of items that are currently stored in the ComboBoxCell. With this reference, you can add items, remove items, and obtain a count of the items in the collection. For more information on the tasks that can be performed with the Items collection, see ComboBoxCell.ObjectCollection.
If strings are added to Items, then ListCell.ValueMember and ListCell.DisplayMember do not need to be set because each added string is used for both value and display.
If the ListCell.DataSource property is set, then the Items property cannot be used.
The formatted value of the cell must always be one of the values in the Items collection or an error will occur and the cell value reverts to the first item in the collection. You can customize this behavior by handling the GcMultiRow.DataError and GcMultiRow.CellFormatting events.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2