Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListView - Multi-Select - The Enigma
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00861463
Message ID:
00861955
Vues:
21
Hi Morgan,

Sorry it took so long to get back to you. I have been traveling with my family and had no internet access.

I would put your code in textbox's Validating handler instead of the Validated. This way the events will fire as you expect them to. The Validating event will fire before the SelectedIndexChanged event on the ListView.

>Cathi, I thought I would address this to you, because I'm thinking that you have the best chance of having an idea about this.
>
>Hopefully, I can articulate my problem well enough to get some help.
>I have ListView, which I'm using to navigate and display a DataSet's DataTable. I have several controls in a panel below the ListView, and I'm binding those controls to the temporary DataTable. I'm populating the temporary DataTable using the ListView for navigating and getting the data from the DataSet to fill in the temporary DataTable.
>
>I can't bind directly to the DataSet with either the ListView or the Controls, because I want to allow for updating multiple rows at a time, by multi-selecting, modifying the values of the controls, and have it update the dataset's appropriate rows.
>
>Ok, now to the problem.
>
>When, I've selected an item in the ListView, and then fill in the value of a TextBox, and then select another item, I'm getting problems updating the appropriate row. This is because of the order of events, the SelectedIndexChanged on the ListView, fires BEFORE the Validated on the TextBox Control.
>
>I've figured out a work around that works for all cases except when the user is using the CTRL key to de-select just one of the ListView items. But, the real question, some other people must have come across this if they are using the ListView for Multi-Selecting and Navigating, what about the MM.NET Framework, how do they get around this problem of events?
>
>Any help will be appreciated.
>
>Morgan
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform