Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
DataGrid dg = new DataGrid();
dg.CurrentCellChanged += new System.EventHandler(dgv_CurrentCellChanged);


private void dgv_CurrentCellChanged(object sender, EventHandler e)
{

}


But i am getting error how to Create dynamically in wpf

the error is

Error 2 No overload for 'dgv_CurrentCellChanged' matches delegate 'System.EventHandler'
Posted

1 solution

The type of the second parameter of your event-handler should be EventArgs instead of EventHandler.

 
Share this answer
 
Comments
Venkanna Toleti 16-Dec-15 4:58am    
EventArgs also getting error
Shmuel Zang 16-Dec-15 7:21am    
What error? If you define your event-handler as private void dgv_CurrentCellChanged(object sender, EventArgs e) {}, it should work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900