Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datagridview validation
Message
De
06/09/2006 10:48:42
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01150920
Message ID:
01151340
Vues:
40
Kevin,

That makes perfect sense. The Validation is just looking at one record. I made the changes, now the next problem is that when an error occurs, it is always reported in the first row.

I'm thinking that the process for displaying the error in the correct row goes something like this:

In the DataGridView RowLeave event:
-Call the Validation method for each column of interest
-Check the BrokenRulesCount
-Retrieve the error from GetBrokenRules()
-Display the error in the appropriate row/column using SetError and setting epArgs.Row and epArgs.ColumnName for the appropriate cell.

Is there a better way to do this? I can't seem to find a simple way to correlate the row in the DataGridView with the DataRow it is referring to.

Thanks,
Jeff
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform