问题
I have a C# 3.5 WinForm project, and I can't find where to adjust Margin used for a DataGridView's Header AutoSize.
AutoSizeColumnsMode is set to None. I can resize the column larger or smaller, then double click to AutoResize, and it pops to this width, using the margin illustrated by my awesome paint skills:
How can I adjust the margin used?回答1:
Something like this: C# AutoSize DatagridView Populated By Linq Query
回答2:
"I want to adjust the margin used by autosizing"
The property used to set a DataGridView's Margin Column size is slightly less obvious:
DataGridView1.RowHeadersWidth = 41;
来源:https://stackoverflow.com/questions/6528552/c-sharp-winform-3-5-datagridview-column-autosize-margin