ListItem(Object, String) Constructor
Constructor
Namespace: EWSoftware.PDIAssembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
public ListItem(
Object? value,
string? text
)
Public Sub New (
value As Object,
text As String
)
public:
ListItem(
Object^ value,
String^ text
)
new :
value : Object *
text : string -> ListItem
Parameters
- value Object
- The value for the item
- text String
- The display text for the item
Pass it the value and display text to use for the item. If the display text is null, it
will be set to the string representation of the value.
cboSortOrder.DisplayMember = "Display";
cboSortOrder.ValueMember = "Value";
cboSortOrder.Items.Add(new ListItem(1, "Item Description"));
cboSortOrder.Items.Add(new ListItem(2, "Maker"));
cboSortOrder.Items.Add(new ListItem(3, "Model"));
cboSortOrder.Items.Add(new ListItem(4, "Part Number"));
cboSortOrder.SelectedIndex = 0;
cboSortOrder.DisplayMember = "Display"
cboSortOrder.ValueMember = "Value"
cboSortOrder.Items.Add(New ListItem(1, "Item Description"))
cboSortOrder.Items.Add(New ListItem(2, "Maker"))
cboSortOrder.Items.Add(New ListItem(3, "Model"))
cboSortOrder.Items.Add(New ListItem(4, "Part Number"))
cboSortOrder.SelectedIndex = 0
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.