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
245
Dynamically resize UltraGrid
posted

I have attached an UltraGrid to the right button of an UltraTextEditor, with the idea of creating a checked dropdown box.  This works fine except I would like grid to automatically adjust its width so that all the text is viewable. 

I seem to be able to do this by calling PerformingAutoResize on the visible columns, adding up their widths and making that sum the grid width.

The problem is when to do this.  If I do it in InitializeLayout, the first time the grid is displayed, the width is incorrect, but after that it is correct.  If I do it too soon, like right after I set the data binding, then the columns have not yet been created, so I can't do it.

Or if there is a better way, please let me know.  Thanks.

Parents Reply Children