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

How to style the group items.

4 Answers 234 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jose Simas
Top achievements
Rank 2
Jose Simas asked on 02 Aug 2011, 05:47 PM
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

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 03 Aug 2011, 08:32 AM
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 >>

0
Jose Simas
Top achievements
Rank 2
answered on 03 Aug 2011, 03:30 PM
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
0
Accepted
Vanya Pavlova
Telerik team
answered on 03 Aug 2011, 04:34 PM
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 >>

0
Jose Simas
Top achievements
Rank 2
answered on 04 Aug 2011, 10:51 AM
Hi,

Great thanks, this exactly what I was after.

Cheers,
Jose
Tags
GridView
Asked by
Jose Simas
Top achievements
Rank 2
Answers by
Vanya Pavlova
Telerik team
Jose Simas
Top achievements
Rank 2
Share this question
or