Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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