Resizing column number in datagridview c #
IDE VS2010, C # .net 4.0
I need to resize datagridview columns programmatically, so I wrote the following code:
internal static void ResizeGridViewColumns1(Control c, int incrColumn = 5)
{
DataGridView gv = c as DataGridView;
foreach (DataGridViewColumn currentColumn in gv.Columns)
{
currentColumn.Width +=incrColumn;
}
}
above code works for resizing columns for datagridview, but I also want to resize gridNumberColumn (don't know technical term) (see reddish part).
please tell me how to programmatically resize this reddish part.
+3
source to share