wsyeager
Centurion
Is there a way to set the scroll position of a 1 row multiple selection listbox that is a template column from within the datagrid?
After I get values back from my db, I want to set the value to the first position that is selected in this listbox.
It always goes to the first position in the listbox.......
Here is my code:
<code>
For Each drShiftDate In dr
drRider = DsRider1.Riders.FindByUserID(drShiftDate.UserID) 'Find the UserID in the Rider listbox
If Not drRider Is Nothing Then
lstRiderTemp.Items.FindByValue(drShiftDate.UserID).Selected = True
lstRiderTemp.SelectedIndex = lstRiderTemp.Items.IndexOf(lstRiderTemp.Items.FindByValue(drShiftDate.UserID))
End If
End If
Next
</code>
After I get values back from my db, I want to set the value to the first position that is selected in this listbox.
It always goes to the first position in the listbox.......
Here is my code:
<code>
For Each drShiftDate In dr
drRider = DsRider1.Riders.FindByUserID(drShiftDate.UserID) 'Find the UserID in the Rider listbox
If Not drRider Is Nothing Then
lstRiderTemp.Items.FindByValue(drShiftDate.UserID).Selected = True
lstRiderTemp.SelectedIndex = lstRiderTemp.Items.IndexOf(lstRiderTemp.Items.FindByValue(drShiftDate.UserID))
End If
End If
Next
</code>