Solved

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

Posted on 2007-03-22
2
305 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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

13 Experts available now in Live!

Get 1:1 Help Now