W
wrecker
Hi all,
I have a dataset bound to a dropdownlist and I'm trying to get the
dropdownlist to start off with a default value selected (not the first
value). Is there any way that I can retrieve the index of the item I
want from the dataset and use this to set the SelectedIndex of the
dropdownlist? I've tried creating a dataview from the dataset and
sorting it and then using the return value of DataView.Find() method
to set the index but it doesn't seem to set the index correctly
(probably because it is now sorted?). Is the only way to iterate
through the dataset until I find the row I want?
Thanks
Rene
I have a dataset bound to a dropdownlist and I'm trying to get the
dropdownlist to start off with a default value selected (not the first
value). Is there any way that I can retrieve the index of the item I
want from the dataset and use this to set the SelectedIndex of the
dropdownlist? I've tried creating a dataview from the dataset and
sorting it and then using the return value of DataView.Find() method
to set the index but it doesn't seem to set the index correctly
(probably because it is now sorted?). Is the only way to iterate
through the dataset until I find the row I want?
Thanks
Rene