We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Datagrid Header height

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

7 Replies

AD Administrator Syncfusion Team May 22, 2003 07:12 AM

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 06:21 AM

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 04:32 AM

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 05:40 AM

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 08:28 AM

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 04:15 PM

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 10:43 AM

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 > > > > >

Loader.
Live Chat Icon For mobile
Up arrow icon