General information
Category:
The Mere Mortals .NET Framework
Title:
Datagridview validation
I've been having interesting problems with the DataGridView, so I thought I'd look at the Northwind example to see if the problems exist there also or if it is something I'm doing different (what I expected to find).
I ran the program, selected Customer ANATR and Invoice 10308. When I went to the Properties page, I changed the Qty in the first line to 6 and hit Save. It gave me an error that the discount could not be 0 (IsEmpty() issues are another story). I changed it to 1 and it saved fine. I moved to the second line, changed the Qty to 6 and hit save, and did not get an error for the Discount being 0. I got curious. I set a breakpoint in OrderDetailRules.CheckRulesHook to see what is happening. It turns out that this.CurrentRow stays at 0. So when I enter data in row 1, it validates row 0 again. I sure hope I'm missing something here. I realize that the demo does not contain bulletproof validation, but this has me concerned.
I look forward to you pointing out the error of my ways,
Jeff
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only