Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

DataGrid: Can I use two text lines in the header ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Heinz Z. - 28 Sep 2004 10:11 GMT
Hello,

I have some boolean columns in my datagrid. To minimized the column width I
want to change the height of the header row and write the header text in two
lines.
Is this possible ?
How can I do that ?

Thank you

Heinz
Phil Williams - 28 Sep 2004 12:25 GMT
It is possible.

First set the HeaderText for the columns in code, eg

dataGridBoolColumn1.HeaderText = "Line 1\nLine 2\nLine 3";

Next, set the dataGrid1.HeaderFont to a larger font.  This increases the
height of the Headers, but the Headers are still displayed using the
dataGrid1.TableStyles[ 0 ].HeaderFont font.

Regards,
Phil.


> Hello,
>
[quoted text clipped - 7 lines]
>
> Heinz
Heinz Z. - 28 Sep 2004 13:14 GMT
Thank you,
now it runs perfectly.

Regards,
Heinz

> It is possible.
>
[quoted text clipped - 20 lines]
> >
> > Heinz

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.