?
Solved

Best Event for validating Cell Data for a DataGridView???

Posted on 2007-03-22
2
Medium Priority
?
313 Views
Last Modified: 2010-04-23
I am trying to validate data in a DGV. I have a breakpoint set in the KeyDown, KeyUp events of the Grid, but when I enter data and then leave....it doesn't hit the breakpoint. What is the best DataGridView Event to use to validate Cell Data?
0
Comment
Question by:BlakeMcKenna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Expert Comment

by:Jon_Raymond
ID: 18773185
try SelectedIndexChanged event of the grid, but this, I think, fires when you move to a new row.You coud also add a validation control if you have a template in the grid. Edit the template and add it there or in the HTML. You can also use the events of a text box in the template, such as the textchanged event
0
 
LVL 34

Accepted Solution

by:
Sancler earned 2000 total points
ID: 18773462
DataGridView.CellValidating Event

It's in the help files, or see here

http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvalidating.aspx

Roger
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question