TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Administrator
Tech Writer
2.2k
1.5m
ListView_SelectedIndexChanged event
Mar 16 2003 7:01 PM
I have a listview which can contain a large number of items (files, sizes are included) and in the status bar of the application I show how many items are selected and the total number of bytes of all the selected files. I have a handle set up for ListView_SelectedIndexChanged to caluculate this information and place it on the statusbar. At first my "Select All" was pretty slow as it looped through the items in the ListView and set them to selected one at a time which called my selected index changed event (once for each time an item was selected) and calculated the total. I solved this problem by having my select all function -= the event handler before it started and then re-adding it and then manaually calling it when it was done selecting everything. That worked great, but now my problem is whenever I have everything selected and then select one item the framework calls the ListView_SelectedIndexChanged once for every item it deselects. And this is slowwwww. Does anyone have an idea about how I fix this up?
Reply
Answers (
6
)
Random Class
problem accessing the collection of objects from a class into a form..