Solved

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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 …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 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