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

Style Property for RadGridViewColumn

3 Answers 35 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 25 Aug 2011, 10:46 AM
Hi All,

How do you add styles to a RadGridViewColumn (e.g. GridViewDataColumn, GridViewDynamicHyperlinkColumn) when it doesn't have a Style Property. I want to create a generic style to do a style setter on the following properties. 

  <Style x:Key="RadGridViewStyle"
           TargetType="telerik:RadGridViewColumn">
        <Setter Property="TextWrapping"
                Value="NoWrap" />
        <Setter Property="Width"
                Value="*" />
        <Setter Property="IsFilterable"
                Value="False" />
    </Style>

Thanks,

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Aug 2011, 01:34 PM
Hello Don,

 The GridViewColumn is not a visual element and it would not be possible to apply a style for it.

Best wishes,
Didie
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Jorge
Top achievements
Rank 1
answered on 26 Dec 2012, 02:45 PM
So, what is the solution? Your answer only tells Don that he cannot do it the way he wanted, but you fail to provide an example for him and others. I too want to know how this is done.
0
Dimitrina
Telerik team
answered on 26 Dec 2012, 02:49 PM
Hello,

You can define a Style targeting "GridViewCell" instead and then apply it for a specific column through its CellStyle property. You can check this help article for a reference.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Don
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Jorge
Top achievements
Rank 1
Share this question
or