Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListBox problems
Message
 
À
02/03/2005 13:34:33
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00992047
Message ID:
00992106
Vues:
17
Bonnie,
I am glad to hear you can reproduce my problem <s>.
Do you know what would fire when an item is in a listbox is clicked? In addition to SelectedIndexChanged() event there must be another event that fires. The error is thrown after SelectedIndexChanged as far as I can see.
I might just have to change to using a datatable insted of a collection object, but like before I would like to figure out what is going wrong <s>

Einar


>Wow Einar ... you sure do find the weird problems!! <g> At first I thought maybe it was because you removed the item from the Collection before you set the ListBox's DataSource back to null, so I tried switching the order of that around. It still crashes. You've got me stumped!!!
>
>~~Bonnie
>
>
>
>>I ran into some more problems related to my ListBox.
>>I have a listbox on my form. I have set the listbox's datasource to a collection class object.
>>I added a delete button with the follwoing code to delete an entry from the listbox:
>>
>>this.oIndividualDelayCollection.Remove(this.oIndividualDelayCollection[this.lstIndividualDelay.SelectedIndex]);
>>this.lstIndividualDelay.DataSource = null;
>>this.lstIndividualDelay.DataSource = this.oIndividualDelayCollection;
>>
>>
>>Now lets assume that I have 3 items in my listbox (and in the collection object)
>>Considder the following scenarios:
>>1. I select the first element in the listbox and press the delete button. Element is deleted from the collection object and disapears from the listbox as expected and I can navigate between the remaining two items in the listbox.
>>
>>2. I select the 3rd item in the listbox and press the delete button. Element is deleted from the collection object and disapears from the listbox as expected, BUT I can not navigate between the remaining two elements of the listbox. Trying to click an element in the listbox throws an error and I can't find where the error is thrown from even when I step through with the debugger.
>>
>>Any help would be appreciated.
>>
>>Thanks,
>>Einar
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform