Hi all,
I'm building an app where I have four GridControls in a resizable form. These GridControls hold a variable amount of rows, though never more than a couple dozens or so, and they are arranged in a column.
I want the vertical size of the GridControls to always be the right size to display all of the rows they contain (plus the insertion row), and no more. Ideally, the GridControls should never display the vertical scrollbar. If the user adds rows, the relevant GridControl should become taller. If the form is too small to contain all the rows of all the GridControls, then a vertical scrollbar should appear on the form itself.
I'm running into problems implementing this because it seems that the GridControl is basically designed to have a fixed size. I can't find a way to tell it to resize itself dynamically.
I guess I could take the row count, multiply it by something, add something else, and do the resizing myself whenever the user adds or removes a row, but that sounds like a really inelegant solution - and how do I figure out row and header height with certainty, what with styles and spacing and stuff?
Is there any way to just make the GridControl autosize to match its contents?