ccrenil
asked on
How do I resize width of a windows user control dynamically?
I am developing a user control which have only a datagridview in it. Now I want to increase the width of the control dynamically according to the width of the datagridview. I have tried to set the this.Width property of the control, but it is not changing. I am using Visual studio 2010 as IDE and my back end code is in C#
ASKER
@guvera
Thanks for the reply. But i didn't get a solution on this.
Thanks for the reply. But i didn't get a solution on this.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks all for your prompt reply. I got the solution. I was trying to set the width of the user control at run time and it never changed. But when I set the width of the datagridview inside the control,it automaticaly adjusted its width according to the datagridview's width.
check the below link.
http://stackoverflow.com/questions/749869/cannot-modify-expression-because-it-is-not-a-variable
Regards
Guvera