J
John Wright
I have a dropdown that I load a list of values from a database. If I have
more that one value returned from a search I want to populate the dropdown
and have the first value be "<Select Run>". Then have the person use the
dropdown to select the item. If only one item is found, then I show the
item in the dropdown and load its values without a problem. Here is the
code I use to populate the dropdown. How would I add the <Select Run> item
after binding to the datatable?:
If dtCrushing.Rows.Count > 1 Then
With cboCrushingRunNumber
.DataSource = dtCrushing
.DisplayMember = "Run_Nbr"
.ValueMember = "RunID"
.SelectedIndex = 0
End With
Else
'load the data
LoadCrushingData(dtCrushing)
End If
more that one value returned from a search I want to populate the dropdown
and have the first value be "<Select Run>". Then have the person use the
dropdown to select the item. If only one item is found, then I show the
item in the dropdown and load its values without a problem. Here is the
code I use to populate the dropdown. How would I add the <Select Run> item
after binding to the datatable?:
If dtCrushing.Rows.Count > 1 Then
With cboCrushingRunNumber
.DataSource = dtCrushing
.DisplayMember = "Run_Nbr"
.ValueMember = "RunID"
.SelectedIndex = 0
End With
Else
'load the data
LoadCrushingData(dtCrushing)
End If