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

Columns groups

3 Answers 190 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Getulio
Top achievements
Rank 1
Getulio asked on 30 Jan 2013, 12:22 PM
Hi,

I'm using RadPivotGrid with Column Group:

            <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                <pivot:PropertyGroupDescription PropertyName="Periodo" CustomName="PerĂ­odo" SortOrder="Descending" />
            </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>

As the attachement image shows, I've put the total before column groups. It's a native control feature.

Now I want:

1 - That totals  cells have lines like group cells;
2 - Alternating backgroung color for group cells. Example: group A cells background diferent from group B cells background.

How can I achieve this?

3 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 30 Jan 2013, 02:38 PM
Hi Getulio,

Thank you for choosing RadPivotGrid. Here are the answers of your questions:
1) You can achieve this with QuickStyles. Here is our online demo which shows the usage of QuickStyles with RadPivotGrid  (the same is available for WPF). I've created a simple project for you, where I've included the default QuickStyle and I've just modified the Brushes for GrandTotals and SubTotals. You can find the project attached and use it for your reference.
2) You can create CellTemplateSelector and use your own DataTemplate for each cell. But with current release this is not available for the headers. In the attached project you will find a simple CellTemplateSelector - you can implement your logic in the same manner.

Hopefully this helps. Do not hesitate to contact us if you have any problems or concerns.

Kind regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Getulio
Top achievements
Rank 1
answered on 31 Jan 2013, 01:19 PM
Hi Rosen,

Thaks. You helped me a lot.

But, I'm still having a little problem.
I've cut and paste quickstyles from your sample project and implemented CellSelector.
In CellSelector I'm returning custom templates, exactly as your code does.
But, my background cells are allways white.
The pivotgrid doesn't respect any changes that I do, like font size, background color, etc...

Can you help me again?

Regards,
0
Rosen Vladimirov
Telerik team
answered on 31 Jan 2013, 02:28 PM
Hello Getulio,

Maybe in your CellTemplateSelector you are checking the incorrect name of the column. From your image and the previously sent project, to apply the templates you will have to check if the column name is "Cancelado". I'm sending you a modified version of the project where you will find some changes in the CellTemplateSelctor which should do the job for you. Please check the attachment and test it in your project.

I'm looking forward to hearing from you if the new project helps.

Regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PivotGrid
Asked by
Getulio
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Getulio
Top achievements
Rank 1
Share this question
or