How to make the column header multiline in a datagrid?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Does anyone know how to make the header text of a column in a data grid multiline

Thanks!
 
Hi Bil
AFAIK Windows Forms datagrid doesn't support Multi Line Headers. Please let me know, if you get a solution for this
Thanks
Ramje
Microsoft India Community Star
 
The only way I have found to get around this is by creating a new tablestyle
as well as a collection of columnstyles and setting the headertext property
for each column at runtime...

For instance...

colNOTE_STCNUM.HeaderText = "Sold To" & VbCrLf & "Customer #"

BTW... If anyone knows a way to wrap all of the text in a cell of a datagrid
that is bound to dataset, I'm all ears!!! The grid will display all of the
text in the cell as long as the cell has the focus. But, once the cell loses
focus, the data viewable is truncated by the actual column width. I'd love
to find a way around this.
 
Back
Top