Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid Header & Data row properties

Status
Not open for further replies.

raghu75

Programmer
Nov 21, 2000
66
IN
Is it possible to specify different allignment for the header and the text (data rows) in a data grid? The language used is C#.
 

Yes, it is possible.

1. In the page (.aspx) you can set in the properies of Grid the HeaderStyle (you find in this section HorizontalAlign) and ItemStyle ( HorizontalAlign property).

2. In .cs:

DataGrid1.HeaderStyle.HorizontalAlign=HorizontalAlign.Left;
DataGrid1.ItemStyle.HorizontalAlign=HorizontalAlign.Right;

Hope this help,
Mary
 
Hi,
I am using a Winform and not a webform I missed it somehow...sorry for that,,is it possible in Winform?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top