I have a Windows Forms user control which consists of several controls. Among others there is also gridview control. Now I want to use the user control in a form. How can I check for example if a grid row is clicked? I want to get the data of the selected row.
In other words, how can I detect events of the controls, which are embedded in the user control?
I have a Windows Forms user control which consists of several controls. Among others
Share
You need to expose the events from your parent control by adding additional events:
And you call it on your child control using the following:
You then implement this the same way you would any event on your form: