By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,209 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,209 IT Pros & Developers. It's quick & easy.

multiline column header in DataGrid

P: n/a
How do I define multiline column header in DataGrid control?
I need two-line headers for some columns.

Thank you
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Any cell in a Datagrid (which is an HTML table when presented client side)
wraps text to as many lines as required to fit by default.

When you say multiline, is this what you mean, or are you refering to having
two fields in one column?

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
How do I define multiline column header in DataGrid control?
I need two-line headers for some columns.

Thank you

Nov 16 '05 #2

P: n/a
Dan,

I mean Windows Forms Datagrid control, not Web DataGrid.

"Dan Bass" wrote:
Any cell in a Datagrid (which is an HTML table when presented client side)
wraps text to as many lines as required to fit by default.

When you say multiline, is this what you mean, or are you refering to having
two fields in one column?

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
How do I define multiline column header in DataGrid control?
I need two-line headers for some columns.

Thank you


Nov 16 '05 #3

P: n/a
Have you tried putting a new line character (\r\n) into the header?

string columnHeader1 = "First Line\r\nSecond Line";

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
Dan,

I mean Windows Forms Datagrid control, not Web DataGrid.

"Dan Bass" wrote:
Any cell in a Datagrid (which is an HTML table when presented client
side)
wraps text to as many lines as required to fit by default.

When you say multiline, is this what you mean, or are you refering to
having
two fields in one column?

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
> How do I define multiline column header in DataGrid control?
> I need two-line headers for some columns.
>
> Thank you


Nov 16 '05 #4

P: n/a
Yes I have. It didn't work: Second Line becomes invisible, and header's
height remains the same, with room for one line only.
"Dan Bass" wrote:
Have you tried putting a new line character (\r\n) into the header?

string columnHeader1 = "First Line\r\nSecond Line";

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
Dan,

I mean Windows Forms Datagrid control, not Web DataGrid.

"Dan Bass" wrote:
Any cell in a Datagrid (which is an HTML table when presented client
side)
wraps text to as many lines as required to fit by default.

When you say multiline, is this what you mean, or are you refering to
having
two fields in one column?

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
> How do I define multiline column header in DataGrid control?
> I need two-line headers for some columns.
>
> Thank you


Nov 16 '05 #5

P: n/a
There's a rumour this can do it:
http://dotnet.leadit.be/extendeddatagrid/

it's free as well.

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:15**********************************@microsof t.com...
Yes I have. It didn't work: Second Line becomes invisible, and header's
height remains the same, with room for one line only.
"Dan Bass" wrote:
Have you tried putting a new line character (\r\n) into the header?

string columnHeader1 = "First Line\r\nSecond Line";

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
> Dan,
>
> I mean Windows Forms Datagrid control, not Web DataGrid.
>
> "Dan Bass" wrote:
>
>> Any cell in a Datagrid (which is an HTML table when presented client
>> side)
>> wraps text to as many lines as required to fit by default.
>>
>> When you say multiline, is this what you mean, or are you refering to
>> having
>> two fields in one column?
>>
>> "Alex K." <Al***@discussions.microsoft.com> wrote in message
>> news:2E**********************************@microsof t.com...
>> > How do I define multiline column header in DataGrid control?
>> > I need two-line headers for some columns.
>> >
>> > Thank you
>>
>>
>>


Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.