[SOLVED] Exception on DGV RowHeader width

Answered Closed
0
0

Hi,

this is minor and, I suppose, very easy to fix, but since I run into it I thought I should report.

If I set a DGV’s RowHeadersWidth to 2, I get an argument out of range value exception saying that it cannot be less than 4.

Best,
Alex

  • You must to post comments
Best Answer
0
0

It’s a limit set in the code to be the same as WinForms. We can set it to 1 or 0 (becoming hidden).

  • You must to post comments
0
0

Hi Luca, thanks for your answer.

I didn’t know about the limit in WinForms. In such case, I thought that it should set the value to Max(value, 4) silently, it was the exception that struck me. If WinForms throw the same exception, I would leave it as it is to be as close to WinForms as possible. In any case is nothing important.

Best,
Alex

  • You must to post comments
Showing 2 results