Method 1: Using the built-in property
Set the AllowProportionalColumnSizing to True, to auto-resize the columns when the grid is resized.
Way 2: Using work-around
To auto-size the columns, you can use grid.ColWidths.ResieToFit and create an array of doubles. For example, in this array, colRatios, computes the ratio of each column width to the grid.ClientSize.Width.
This gives the proper proportion value for each column. Then you can subscribe to grid.QueryColWidth and provide the size of the column widths by multiplying this ratio with the grid's width. Set e.Handled = true. You can refer to the following codes.
This page will automatically be redirected to the sign-in page in 10 seconds.