SelectedIndexChanged event and the list view control.

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Robin Tucker (idontwanttobespammedanymore_at_reallyidont.com)
Date: 04/23/04


Date: Fri, 23 Apr 2004 14:56:59 +0100

When volume testing my application I have noticed a big problem with
listview controls populated with large numbers of items (ok, when I say
large, I mean 3 or 4 hundred items, so in the grand scheme of things, quick
small!).

The problem is that I am using a multiple selection list view and if the
user selects item 1 and then Shift-selects to the end of the list, the
selectedindex event is fired around 400 times! This means that any events I
fire or things I do in the handler get executed once for each new selected
item.

What I want to do is detect a selection change in the round, not on an
individual item basis, so I can fire my event just once when a new "multiple
selection" is made.

How can I do this?



Relevant Pages

  • Re: Listbox Problem
    ... the click event would fire continuously. ... Private Sub ListBox1_MouseDown(ByVal Button As Integer, ... I'm not sure how to remove the selection. ... >>the box is pristine for the next user selection. ...
    (microsoft.public.excel.programming)
  • RE: DateTimePicker ValueChanged Event repeats with month arrow
    ... By design it should fire one more time for 2005/06/06 per your example. ... For DateTimePicker control, when we clicked the dropdown arrow, ... > selection, so DateTimePicker will select 2005/6/6 as the selected value. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Update a read-only recordset
    ... I should have mentioned there's a button to fire off your code after the user ... to do with a datasheet in a subform. ... You can use your update query instead of the append query. ... selection active. ...
    (microsoft.public.access.forms)
  • Re: ComboBox Problem - Hows the best way to do this?
    ... Actually, the Update events fire whenever the selection in a combo changes, ... >> What if the user tabs into the combo, makes a change, tabs out? ...
    (microsoft.public.office.developer.vba)
  • Re: FormView DropdownList - On Selection Change populate Text Box
    ... regardless of Postback - true/false. ... the selectionindexchanged event just does not fire. ... I read thru the AutoEventWireup attribute and made sure that it is set to ... Selection Changed of this DropdownList, I need to populate a couple of ...
    (microsoft.public.dotnet.framework.aspnet)