DataGrid - Change column Headers height and row vertical alignment text.
-
In my application I use System.Windows.Forms.DataGrid (not DataGridView!) Unfortunately, I cannot change ColumnHeadersHeight - there is no such property for this control. And secondly, if I increase the row height, text is aligned to the top of row, but vertical alignment is needed. Is there any solution to this problem?
-
In my application I use System.Windows.Forms.DataGrid (not DataGridView!) Unfortunately, I cannot change ColumnHeadersHeight - there is no such property for this control. And secondly, if I increase the row height, text is aligned to the top of row, but vertical alignment is needed. Is there any solution to this problem?
The old DataGrid wasn't very flexible. You don't have the control over its rendering like you do with the DataGridView. The only way to SIMPLY get the functionality you want is to drop the DataGrid and replace it with the DataGridView. Otherwise, you're writing a whole bunch of drawing code and drawing the DataGrid yourself. You really don't want to do that.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak