Stanly,
This is one of those funny ones like resizing a form. Using the mousedown, mousemove and mouseup events, you can make this "appear" to be dynamic. I do this with my forms, but putting a tiny graphic (image object) on the form, and I then use it's mouse(events) to control resizing my form dynamically. You can do the same thing with your grids with the same type of "visual queue" object. (What I use is a tiny graphic that has 6 dots in the bottom left corner, to show that they object is "resizeable by dragging the corner around".
You use the image object to control the height and width of the grid object, so it is controlled externally, since the grid object itself doesn't have such a method.
If you want to make that "Reusable" you could create a new grid type using a container, and put the grid in it, add the graphic, and then use inheritance to control that object (if I were going to have a resizable grid, this is how I would do it).
BUT... now you're responsible for some things too. How do you limit where the grid can be sized to? Is it also free-floating? Do you have room on your form to resize the grid? Do you want a form resize to take place first, so you have room and then the grid? Do you want ALL your controls to dynamically resize with a form resize?
These are not trivial issues, but they are all things you're going to need to manage if you're going to enable your grids to be dynamically resized at runtime.
Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS, ATD
"I try to be nice, but sometimes my mouth doesn't cooperate.