The System.Windows.Forms.DataGridView control has one desirable feature. If you have, say, 3 columns and set the AutoSizeMode property of the first two columns to "AllCells" and the AutoSizeMode property of the third to "Fill" you get a nice clean look where the first two columns are exactly big enough to display their data and the third column is exactly big enough to fill the rest of the grid row regardless of how wide or narrow the grid is. Using this example:
https://www.devexpress.com/Support/Center/Question/Details/Q277805/autowidth-of-grid-columns
I was able to easily set all the columns so they're big enough to show their data but this leaves blank space after the last column (see attached screenshot) . Is there a way to simulate the behavior of the Windows grid?
GridView best fit columns
Answers approved by DevExpress Support
Hello Robert,
Starting with version 17.1, we introduced the GridView.AutoFillColumn property that allows you to specify the column that will fill the free space. Set your latest column to this property to achieve your goal.