C# - Get the sum of the total amount of width for each column in datagridview -
is there faster way other looping through each column , increment variable width?
for best solution, pretty slow:
int contentwidth = 0; foreach (datagridviewcolumn column in grid.columns) { contentwidth += column.width; }
this return length of visible columns:
contentwidth = grid.columns.getcolumnswidth(datagridviewelementstates.displayed);
Comments
Post a Comment