By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,018 Members | 870 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,018 IT Pros & Developers. It's quick & easy.

Jump to first selected item in ListBox control

P: n/a
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

Jan 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.