List Item(Object, String) Constructor
Constructor
Definition
Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
C#
public ListItem(
Object? value,
string? text
)VB
Public Sub New (
value As Object,
text As String
)C++
public:
ListItem(
Object^ value,
String^ text
)F#
new :
value : Object *
text : string -> ListItemParameters
Remarks
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.
Example
C#
// Set the sort order values using ListItem objects
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;VB
' Set the sort order values using ListItem objects
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 = 0C++
No code example is currently available or this language may not be supported.F#
No code example is currently available or this language may not be supported.