Link to home
Start Free TrialLog in
Avatar of atomicgs12
atomicgs12Flag for United States of America

asked on

C# How to get DataGridViewCellEventHandler in code via Designer

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
ASKER CERTIFIED SOLUTION
Avatar of Michael Fowler
Michael Fowler
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of atomicgs12

ASKER

Perfect, thanks.