DatagridView Custom Column Events
-
Hi All, I have created a custom datagridviewColumn control containig a TextBox+Button. I want to access the events of these controls directly, for example TextBox_textChanged, Button_MouseHover.i have found that In DataGridViewButtonColumn we have to access the button through Cell_Click event, but this doesn't resolve my problem. Can someone please tell me how to access the events of controls contained in DataGridViewColumns? Thanks
sorry for my bad English.
-
Hi All, I have created a custom datagridviewColumn control containig a TextBox+Button. I want to access the events of these controls directly, for example TextBox_textChanged, Button_MouseHover.i have found that In DataGridViewButtonColumn we have to access the button through Cell_Click event, but this doesn't resolve my problem. Can someone please tell me how to access the events of controls contained in DataGridViewColumns? Thanks
sorry for my bad English.
Hello If you've created that custom control then you control its events. You can do this in two approaches: 1- Make a custom event in your custom control. Handle whatever events you want to handle of the button and textbox private inside your control. From these handlers, fire the public event. Now handle that public event in your form. 2- Just declare your button and textbox as public members of your control. Then you will have access to their events as well. Programatically only of course -ie. you may not access their events using the PropertyGrid by default-. Regards:rose: