Two rows in a grid column header

A

Andrew Chalk

How do I have my header of a DataGrid column on more than one line. For
instance, if the header is "Wurzle Gummage" how do I format it as:

Wurzle
Gummage

preferably with control of the row justification as well.

Many thanks
 
G

Guest

I was trying to solve this problem for a long time, trying different things and browsing through several message board with no luck

then I realized it was easier than I thought, all you have to do is to develop a windows user control, place a datagrid and set the ColumnHeaders property to false

Then you need to create a property to expose the datagrid within the control and you can use the form's paint event to draw the headers the way you want

Obviously if you want the grid to be sortable you need to do it yourself.
 

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