Gil asked this question and got no response, but I thought I would try my luck...
In a .NET VB WinForm datagrid, I need the headers to be two lines per column. So a header might look like this:
Company
Name
Does anyone know how to change the row height of the header and put two lines in it?
Charles Young
Charles.Young@fhr.com
AD
Administrator
Syncfusion Team
May 22, 2003 11:12 AM UTC
I'm trying a similar technique to the one in the FAQ about row headers.
The header height can be set by changing the HeaderFont size, and then overwrite paint, fill the header with HeaderBackColor and manually draw the two lines of text. That's my plan anyway.
Simon
CA
Carl
June 15, 2003 10:21 AM UTC
I've managed to do a workaround by putting a vbCrLf where I want the row to end.
AD
Administrator
Syncfusion Team
August 7, 2003 08:32 AM UTC
I put a vbCrLf just like you have done and the text is divided into two lines. The problem is that the height of the row is not resized so I only see the first line of text. How did you solve this?
AD
Administrator
Syncfusion Team
August 7, 2003 09:40 AM UTC
Problem solved! I just put the HeaderFont to something big. It didn´t change the size of the text(maybe because I have ColumnStyles) it just changed the rowheight.
/Therese
NI
Nick
August 15, 2003 12:28 PM UTC
Actually I changed the row height by creating a custom table styles then setting the row header height and it work easily.
> Gil asked this question and got no response, but I thought I would try my luck...
>
> In a .NET VB WinForm datagrid, I need the headers to be two lines per column. So a header might look like this:
> Company
> Name
>
> Does anyone know how to change the row height of the header and put two lines in it?
>
> Charles Young
> Charles.Young@fhr.com
>
>
DA
Dale
August 27, 2003 08:15 PM UTC
Lets see some code?
Please remove _NoSpam from the email address if your are replying to me.
thanks
Dale
> Actually I changed the row height by creating a custom table styles then setting the row header height and it work easily.
AD
Administrator
Syncfusion Team
March 6, 2004 03:43 PM UTC
I'm curious as to where you change the Row Header Height?? Is this a property for the datagrid that I've missed somewhere and wouldn't that change the row height for all the rows?? So far, the only way I've found to get the actual column header height to actually change is with Therese's example
> Actually I changed the row height by creating a custom table styles then setting the row header height and it work easily.
>
> > Gil asked this question and got no response, but I thought I would try my luck...
> >
> > In a .NET VB WinForm datagrid, I need the headers to be two lines per column. So a header might look like this:
> > Company
> > Name
> >
> > Does anyone know how to change the row height of the header and put two lines in it?
> >
> > Charles Young
> > Charles.Young@fhr.com
> >
> >
>