Is there a way to get a grid to automatically resize its columns when the grid is resized?
In our application, the user can resize the form, which accordingly resizes the grid. Ideally, the grid should resize its columns to make use of the new space or fit in the less space. The columns should also respect the min and max width for the columns.
Also is there a way to save the current state of the grid in terms of order of the columns, grouping, column sizes, sorting, …etc?
Imported from legacy forums. Posted by vboctor (had 2116 views)
For resizing columns: catch the Resize-event of the grid-control, and set the Width-property of your columns manually, in the eventhandler. If you really need this, you’ll also have to either disable manual resizing of the columns by the user, or deal with that too. And how should they resize? Proportionally (each column = x% of total width)? A different approach is to let all columns have a static width, except 1 column whose width will be gridWidth – sumOfWidthOfOtherColumns.
Imported from legacy forums. Posted by Tommy (had 3119 views)