Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 30th, 2005, 02:05 AM
Registered User
 
Join Date: Feb 2005
Location: , , Nepal.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Header Alignment in System.Windows.Foms.DataGrid

Hi all,
I am having a problem of aligning the header of the datagrid. I want my text in a column of datagrid to be aligned to left and the header of that column to be aligned to center.

I have tried the following code but the problem is that this code just aligns the whole column (along with header and text) to left.

So, friends, if you know, please tell me how can I align the text and the header differently.

Using System.Data;

Datagrid dgrd=new System.Windows.Form.DataGrid();
....
....
....
DataGridColumnStyle myStyle=new DataGridTextBoxColumn();
myStyle.Alignment=HorizontalAlignment.Left;


Cheers!!
Pushkar
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
system.stackoverflowexception in system.windows.fo scheidel21 Pro VB.NET 2002/2003 2 May 18th, 2007 12:40 AM
Datagrid column alignment Ric_H ASP.NET 2.0 Basics 0 October 13th, 2006 02:16 PM
datagrid header frezing Rama C# 1 March 2nd, 2006 05:15 PM
Text alignment in datagrid pdsluk ASP.NET 1.0 and 1.1 Basics 0 October 21st, 2003 05:07 AM



All times are GMT -4. The time now is 11:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.