473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

multiline column header in DataGrid

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

Thank you
Nov 16 '05 #1
5 8772
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Shravan Kumar | last post by:
Hi, I am using my code to set column widths of datagrid columns dynamically, but when I am setting the column widths to zero, the header text of the column whose width is made to zero is...
1
by: Webgour | last post by:
Hi, I'm tring to add a column to a datagrid with a linkbutton as header that can be used to sort the column. The column and the linkbutton are added programmatically (see below). However the...
0
by: Matt | last post by:
Hi all, is there any way to create a multiple line column header within the DataGrid? Thanks, Matt.
1
by: Drew | last post by:
Hey, thanks in advance for helping me out with my problem: I have a datagrid which is embedded in another datagrid. The datagrid is filled directly by a dataset generated from a sql query. So...
0
by: cedoucette | last post by:
I just wrote code to support sortable columns in a datagrid. It seems to work fine; but, it doesn't look right. The problem is that I have a generic style for links and a different style for the...
2
by: Stan Sainte-Rose | last post by:
Hi, How can I display a multiline content into a Datagrid column ? The datagrid that I use, displays 2 columns. The first display a code , and the second, a description. The description can...
1
by: ABC | last post by:
I tried KDNGrid's (www.knowdotnet.com) Multiline textbox column style for datagrid. It is very good but has some bug on wrong handle datagrid height that cannot display the scrollbar when a row...
4
by: Grace | last post by:
I use a datagrid included in a repeater. as following: (.aspx) <asp:repeater id="rp_perform" Runat="server"> <HeaderTemplate> <table border="0" bgcolor="gray" cellspacing="0" cellpadding="0">...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.