Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Question about Column sizing
posted

Hey there,

I am using a WinGrid inside of a user control. The Size of the grid has been set to fill its parent container inside the user control, and I've set the anchor mode to "Top, Left, Right".

Now when I databind a datasource to the Grid, depending on the source, there will be a variable number of columns displayed. What happens when there aren't very many columns is that the Grid doesn't fill its parent, and looks a little "off".

Is there a way (for example in the InitializeLayout event) to get the last grid column to expand to fill the unused space inside the Grid? I couldn't seem to find a way.