Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable resizing width of rowheader?

Is there any way to disable resizing of the width of a DataGridView rowheader, without setting AllowUserToResizeRows to False?

I've found row.HeaderCell.Resizable but it's readonly.

like image 364
Gargoyle Avatar asked Dec 12 '22 03:12

Gargoyle


1 Answers

Use the DataGridView.RowHeadersWidthSizeMode Property:

Gets or sets a value indicating whether the width of the row headers is adjustable and whether it can be adjusted by the user or is automatically adjusted to fit the contents of the headers.

myGrid.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
like image 184
C-Pound Guru Avatar answered Dec 13 '22 16:12

C-Pound Guru