GrapeCity MultiRow Windows Forms Documentation
Items Property (ListBoxCell)


Gets the objects that represent the selection displayed in the list.
Syntax
<SRDescriptionAttribute("Indicates the items in the Cell.")>
<SRCategoryAttribute("Data")>
<LocalizableAttribute(True)>
<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")>
<MergablePropertyAttribute(False)>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)>
Public ReadOnly Property Items As ListBoxCell.ObjectCollection
Dim instance As ListBoxCell
Dim value As ListBoxCell.ObjectCollection
 
value = instance.Items
[SRDescription("Indicates the items in the Cell.")]
[SRCategory("Data")]
[Localizable(true)]
[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")]
[MergableProperty(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ListBoxCell.ObjectCollection Items {get;}

Property Value

A ListBoxCell.ObjectCollection that contains the candidates items.
Remarks

This property enables you to obtain a reference to the list of items that are currently stored in the ListBoxCell. 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 ListBoxCell.ObjectCollection.

If strings are added to Items, then ListCell.ValueMember and ListCell.DisplayMember do not need to be set because each string added will be used for both value and display.

ListBoxCell does not support the use of multiple items with identical display values.

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 will revert to the first item in the collection. You can customize this behavior by handling the DataError and CellFormatting events.

Requirements

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

See Also

Reference

ListBoxCell Class
ListBoxCell Members
ValueMember Property
DisplayMember Property

 

 


Copyright © GrapeCity, inc. All rights reserved.