|
-
Aug 2nd, 2004, 11:12 AM
#1
Thread Starter
Fanatic Member
ListView SelectedIndexChanged [Resolved]
ARGH.
Just spent an hour on this stupid control.
I have a single-select listview and on the SelectedIndexChanged event,
I populate some other controls with the data.
Well, when you select a different index, it first de-selects the current item,
meaning your reference to .selecteditems(0) will be empty and my stupid program
will crash.
This method gets called twice on a different selection, once to de-select and
again to select your new item.
Put an if..then checking if .selecteditem.count=0 to skip code if it's true.
Hope this makes sense, and helps the next guy out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|