Columns groups

4 posts, 0 answers
  1. Getulio
    Getulio avatar
    9 posts
    Member since:
    Jan 2013

    Posted 30 Jan 2013 Link to this post

    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?
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 30 Jan 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Getulio
    Getulio avatar
    9 posts
    Member since:
    Jan 2013

    Posted 31 Jan 2013 Link to this post

    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,
  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 31 Jan 2013 Link to this post

    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.

Back to Top