Information générale
Catégorie:
The Mere Mortals .NET Framework
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement