Using VB.Net I want to automatically size the height of the headers in a DataGridView so I am calling AutoResizeColumnHeadersHeight during the form load after the data has been populated.
The method doesn't appear to do anything, but does work if I do the following: - put a breakpoint on grid.AutoResizeColumnHeadersHeight() - open quickwatch on the grid - expand the child properties - close quickwatch and hit F5 to continue processing
The resizing then works!
I assume the reason is that evaluating one of the properties of the grid is causing the method to behave differently.
Does anybody know either what I should be doing differently, or a workaround - e.g. which property do I need to evaluate to make it work?