This is a migrated thread and some comments may be shown as answers.

[Solved] Center align the header text in RadGridView

1 Answer 1285 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Piyush Prakash
Top achievements
Rank 1
Piyush Prakash asked on 22 Feb 2010, 03:16 AM
Hi,
   How to center align the header text in a RadGridView. I tried setting the HorizontalAlignment property of the HeaderRowStyle, but it center align the entire header as opposed to the text in the header.
This what I am doing:

<Grid.Resources><Style TargetType="gridView:GridViewHeaderRow" x:Key="HeaderRowStyle"> <Setter Property="HorizontalAlignment" Value="Center"/> </Style></Grid.Resources>

<telerikGrid:RadGridView x:Name="radGridView" HeaderRowStyle="{StaticResource HeaderRowStyle}" ></telerikGrid:RadGridView>

 

 

Please help.

Thanks,
Piyush

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Feb 2010, 07:14 AM
Hi,

You may need to use some of the column properties like HeaderTextAlignment, HeaderCellStyle or Header directly.

Greetings,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Piyush Prakash
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or