Click here to Skip to main content
15,918,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have a Navigation Application and I have a custom Control which is going to be on every page.

On this User Control I will have a button which will turn the grid by 180d, but I don't know how I can access the grid (or any other element) from my user control.

Any Help?


1 solution

The proper way to do it is to have the parent form subscribe to the button-click event for the button on the user control. I think you may have to change the button to be public in order to do it, but I don't remember exactly if that's necessary.

Once you've done that, simply rotate the grid from the event handler in the main form.
Share this answer

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