How to change data programmatically before validating occur?
After user inputted data to a cell in datagridview (user 开发者_Go百科press Enter key), how to change data programmatically before validating occur?
Please help me!
Maybe try to use CellValidating Event.
Event Documentation
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvalidating.aspxWalk-through of how to use this event (as part of other validation stuff)
http://msdn.microsoft.com/en-us/library/ykdxa0bc.aspx
Disclaimer:
I'm assuming you are doing windows forms as no ASP.NET tag in there.
精彩评论