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

How to align merged column header /

3 Answers 112 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang asked on 04 Feb 2012, 07:32 AM
Hi telerik,

As shown attached image, merged column header always aligned left-align.
How can I align it center ?

Tks
Kang

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 06 Feb 2012, 09:01 AM
Hi Yong-Gu,

 

If you take a look at the default template of CommonColumnHeader you may see that the VerticalContentAlignment of this element is set to centered. What you may do is to create simple style targeted at this element and increase the specified Padding, something like the following:


<Style TargetType="telerik:CommonColumnHeader">
    <Setter Property="Padding" Value="75,0,3,0"/>
</Style>


You may see the result at the attached picture. Feel free to change it in the way you need. 
Hope this helps! 


Regards,
Vanya Pavlova
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 12 Feb 2012, 06:09 AM
Hi, Pavlova

Great, Thank you.
Hope to be declarative by xaml in the furture.

RGDS
Kang
0
Vanya Pavlova
Telerik team
answered on 15 Feb 2012, 09:46 AM
Hi Yong-Gu,

 

Another option to achieve this is through defining a header for the corresponding column group. 
Please refer to our online documentation "Column Headers" for further reference.   


Regards,
Vanya Pavlova
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Yonggu Kang
Top achievements
Rank 1
Iron
Answers by
Vanya Pavlova
Telerik team
Yonggu Kang
Top achievements
Rank 1
Iron
Share this question
or