c# - AutoResize Not Working Properly When ColumnHeader Is Longest String -
dgvsampled.autoresizecolumns(datagridviewautosizecolumnsmode.allcells);
i'm trying size columns allcells
mode. problem when longest string in column header, buffer left over.
compare requested
column coil #
column. why coil #
column size content, requested
column sizes large header title?
after making columns unable sorted, being sized expected them in first place.
from documentation (emphasis mine):
allcells: column widths adjust fit contents of cells in columns, including header cells.
from description, seems want datagridviewautosizecolumnsmode.allcellsexceptheader
Comments
Post a Comment