S
scartin
Hi,
I have a multi-select ListBox that shows 5 rows at a time, but contains
possibly a hundred or more items. As I retrieve relevant data from
the database, I set the SelectedIndex of the rows matching the value
for the current entry, and those show up as selected in the ListBox
without any problems.
However it is entirely possible, even likely, that the first selected
index in the ListBox will not be in the first several items in the
ListBox. I've looked around for some way to automatically scroll the
ListBox to the first selected item in the array so that the user can
immediately see that an item is populated without having to scroll
through the list, but I haven't found examples of anything that
accomplishes this goal.
If anyone has any ideas regarding how to achieve this result, I would
greatly appreciate it.
Thanks,
Simon Cartin
I have a multi-select ListBox that shows 5 rows at a time, but contains
possibly a hundred or more items. As I retrieve relevant data from
the database, I set the SelectedIndex of the rows matching the value
for the current entry, and those show up as selected in the ListBox
without any problems.
However it is entirely possible, even likely, that the first selected
index in the ListBox will not be in the first several items in the
ListBox. I've looked around for some way to automatically scroll the
ListBox to the first selected item in the array so that the user can
immediately see that an item is populated without having to scroll
through the list, but I haven't found examples of anything that
accomplishes this goal.
If anyone has any ideas regarding how to achieve this result, I would
greatly appreciate it.
Thanks,
Simon Cartin