0

With this code:

const int COMMENTS_COLUMN_DESIRED_WIDTH = 412;
...
dgv.Columns[COMMENTS_COLUMN].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
                dgv.Columns[COMMENTS_COLUMN].MinimumWidth = COMMENTS_COLUMN_DESIRED_WIDTH;

...the COMMENTS column wraps, as I want it to, but after a width of maybe 120 pixels, nowhere near 412. Why is it wrapping before it hits its MinimumWidth value?

The data does not contain line breaks where the wrap is occurring.

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

1 Answers1

0

I changed AutoSizeColumnsMode from "AllCells" to "None" and that does the trick.

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862