Solved

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

Posted on 2007-03-22
2
306 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
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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now