How to style the group items.

5 posts, 1 answers
  1. Jose Simas
    Jose Simas avatar
    35 posts
    Member since:
    Mar 2009

    Posted 02 Aug 2011 Link to this post

    Hi,

    I need to style a few bits from the grid that only appear when the grid is grouped by a column. I am attaching an image with the parts that I need to change:

    1. The square of Header that appears at the top (I need to change the colour to match the rest of the grid's header)
    2. The background of the blank rows and columns that appear when the grid is grouped.
    3. The grey squares beneath the expander (also need to change the background).

    I tried following your instructions detailed here:

    http://www.telerik.com/help/wpf/radgridview-styles-and-templates-styling-the-group-panel.html

    But in Blend 4 I cannot generate the template (Edit Copy is disabled). I am also attaching a picture of this problem. Do I need to do something to enable this for the grid? It works fine with RadComboBox, for example.

    How should I proceed?

    P.S. I notice now I cannot add attachments to this post. Here are two links to the images:

    http://www.gepsoft.com/telerik/GridGroupStyle.png
    http://www.gepsoft.com/telerik/BlendProblem.png

    Best Regards,
    Jose
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 03 Aug 2011 Link to this post

    Hello Jose Simas,

     

    We do have some issues related to the Blend support for RadGridView/WPF. I will recommend you to use the following approach:

    1.Find in Assets library a single GridViewGroupPanel.
    2.Drag it onto the Artboard, right click on it and choose the option Edit Template -> Edit a copy.


    You may use the same approach for any other GridView part.


    Regarding your second question I believe that the following help article "Styling the Indent Cells in RadGridView" could be of help.


    Best wishes,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Jose Simas
    Jose Simas avatar
    35 posts
    Member since:
    Mar 2009

    Posted 03 Aug 2011 Link to this post

    Hi Vanya,

    Thank you for your answer. I managed to find and generate the style with your instructions but I could not figure out how to change the GridViewHeaderIndentCell's colour (although I was able to change other parts of the header). As far as I can see it is defined in the style like this:

    <telerik:IndentPresenter 
    x:Name="PART_IndentPresenter" 
    Grid.Column="1" 
    IsTabStop="False" 
    IndentLevel="{TemplateBinding IndentLevel}" 
    MinHeight="{TemplateBinding MinHeight}" 
    telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
    >
    <telerik:IndentPresenter.ItemTemplate>
    <DataTemplate>
    <telerik:GridViewHeaderIndentCell IsTabStop="False">
    <telerik:StyleManager.Theme>
    <telerik:Office_BlackTheme/>
    </telerik:StyleManager.Theme>
    </telerik:GridViewHeaderIndentCell>
    </DataTemplate>
    </telerik:IndentPresenter.ItemTemplate>
    <telerik:StyleManager.Theme>
    <telerik:Office_BlackTheme/>
    </telerik:StyleManager.Theme>
    </telerik:IndentPresenter>

    I tried several things like changing Backgrounds and adding a border around the IndentPresenter without success. Could you possibly tell me how to solve this problem?

    Best Regards,
    Jose
  5. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 03 Aug 2011 Link to this post

    Hi Jose Simas,

     

    You have to edit the template directly of GridViewHeaderIndentCell and change its background from there, you may refer to the attached picture. The IndentPresenter within GridViewHeaderRow's template displays each HeaderIndentCell in this row. The same is valid for the rest indenting elements in RadGridView.
    Furthermore I have prepared an example for you which demonstrates how this can be achieved. 



    If you need any further assistance do not hesitate to contact us!



    Regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  6. Jose Simas
    Jose Simas avatar
    35 posts
    Member since:
    Mar 2009

    Posted 04 Aug 2011 Link to this post

    Hi,

    Great thanks, this exactly what I was after.

    Cheers,
    Jose
Back to Top
UI for WPF is Visual Studio 2017 Ready