How to make the column header multiline in a datagrid?

G

Guest

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

Thanks!
 
G

Guest

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
 
T

Tim Roop

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top