Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C# How to get DataGridViewCellEventHandler in code via Designer

Posted on 2014-04-21
2
Medium Priority
?
966 Views
Last Modified: 2014-04-22
I have a form which I created via the designer in VS 2008. In my form I have a DataGridView control with some columns in it. Basically whay I am trying to do is implement a DataGridViewCellEventHandler for the CellValueNeeded method via the designer.

I know if one double clicks with in the contorl designer automatically creates a xxx_CellContentClick method in the form's control.cs file along with the DataGridViewCellEventHandler callback in the xxxControlDesigner.cs file.

I want to add DataGridViewCellEventHandlers for CellValueNeeded, CellValuePushed, ColumnHeaderMouseClick and etc.

I thought you where not suppose to directly alter the xxxControlDesinger.cs file so how do these DataGridViewCellEventHandlers end up there that I have seen in other code?

Thanks
0
Comment
Question by:atomicgs12
[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 23

Accepted Solution

by:
Michael Fowler earned 2000 total points
ID: 40013804
When you add an event from the designer the appropiate handlers are added for you. Select the Datagridview and in properties change the view to events and then double click. VS will then add the handlers as appropiate

Michael
0
 

Author Closing Comment

by:atomicgs12
ID: 40015245
Perfect, thanks.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

604 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