(Beginner's question, if offended please move on, otherwise your input is welcome)
Im trying to invoke datagridview events in Wpf code. Implementing the event calling is straight forward.
for example:
dgv1.ColumnHeaderMouseClick+=delegate(
object sender, DataGridViewCellMouseEventArgs e)
{..code on event..};
My question: what is the propper way to invoke the dgv event somewhere else in the code. (press the header column programmatically).
Thank you
A cleaner way for me is to separate the method of of your custom event. Something like this:
Then set that method to the event property of the control like this:
With this code won't get messy and readability is still intact.
I hope it helps you. Happy coding.