Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datagridview validation
Message
From
06/09/2006 10:48:42
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01150920
Message ID:
01151340
Views:
39
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform