windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-listboxitem.md
Gets or sets the item’s value.
Namespace : DevExpress.XtraEditors.Controls
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(null)]
[DXCategory("Data")]
public virtual object Value { get; set; }
<DefaultValue(Nothing)>
<DXCategory("Data")>
Public Overridable Property Value As Object
| Type | Default | Description |
|---|---|---|
| Object | null |
An object representing the item’s value.
|
By default, the item’s display text is specified by the ToString method called for the Value object. In a CheckedListBoxControl and ImageListBoxControl, a list item’s display text can be specified via the CheckedListBoxItem.Description and ImageListBoxItem.Description properties, respectively.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Value property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
foreach (CheckedListBoxItem itm in checkedItem.Items) {
itm.Description = EnumDescriptor.GetCaption(itm.Value);
}
CheckedListBoxControl checkList = sender as CheckedListBoxControl;
CheckedComboBoxItem item = checkList.Items[e.Index].Value as CheckedComboBoxItem;
item.Checked = checkList.Items[e.Index].CheckState == CheckState.Checked;
winforms-grid-hide-vertical-lines-between-certain-columns/CS/E3647/Form1.cs#L82
foreach (CheckedListBoxItem item in checkedListBoxControl1.CheckedItems)
columnList.Add(item.Value as GridColumn);
helper.Columns = columnList;
Dim checkList As CheckedListBoxControl = TryCast(sender, CheckedListBoxControl)
Dim item As CheckedComboBoxItem = TryCast(checkList.Items(e.Index).Value, CheckedComboBoxItem)
item.Checked = checkList.Items(e.Index).CheckState = CheckState.Checked
winforms-grid-hide-vertical-lines-between-certain-columns/VB/E3647/Form1.vb#L79
For Each item As CheckedListBoxItem In checkedListBoxControl1.CheckedItems
columnList.Add(TryCast(item.Value, GridColumn))
Next item
See Also