Style Property for RadGridViewColumn

4 posts, 0 answers
  1. Don
    Don avatar
    7 posts
    Member since:
    Jun 2011

    Posted 25 Aug 2011 Link to this post

    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,
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Aug 2011 Link to this post

    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 >>

  3. Jorge
    Jorge avatar
    17 posts
    Member since:
    Oct 2008

    Posted 26 Dec 2012 Link to this post

    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.
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Dec 2012 Link to this post

    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.

Back to Top