C# How to get DataGridViewCellEventHandler in code via Designer
Posted on 2014-04-21
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?