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

GridView \ Element ( Grid Grouping Panel)

13 Answers 118 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 17 Feb 2011, 11:17 AM
Hy, I wanted to know how to edit the Grid Grouping Panel and the elements within this element, such as the buttons ?
I hope a reply, thanks

13 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 17 Feb 2011, 11:28 AM
Hello Daniel,

You can get to the GroupPanelElement as per the code below
Me.RadGridView1.TableElement.GridViewElement.GroupPanelElement

If you'd like to let me know exactly what you wish to do with it, I'll do my best to help
regards,
Richard
0
Daniel
Top achievements
Rank 1
answered on 17 Feb 2011, 12:12 PM
Hello Richard, Thank you for your fast reply. I am sorry but i think i wasn't clear in what i wanted.
What i was hopping to know is how is it possible to change that element in Visual Style Builder, since i cant find that element.
Best regards, Daniel.
0
Richard Slade
Top achievements
Rank 2
answered on 17 Feb 2011, 12:31 PM
Hi Daniel,

Yes, you can change this in VSB. Please see the attached screenshot
Hope that helps
Richard
0
Daniel
Top achievements
Rank 1
answered on 17 Feb 2011, 12:41 PM
Hi Richard, I think it is not the element that sent me, but this one. sending a print to see which elements to edit.You can help me in this case ?
Thanks for yours reply

0
Richard Slade
Top achievements
Rank 2
answered on 17 Feb 2011, 12:48 PM
Hello Daniel,

To be honest, my knowledge of VSB is not as high as some of the other Telerik products. But I have found this link which explains how to change the elements you need in code.
I hope this helps but if you need more information, just let me know
Regards,
Richard
0
Daniel
Top achievements
Rank 1
answered on 17 Feb 2011, 12:54 PM
Thanks once again Richard, but i i change it in code it will be style independent, but i want to change it in VSB so i can make a different shape and color schema for each style...This would really be helpful because this is the only part of the grid i can't format when creating a style.
Best regards, Daniel
0
Richard Slade
Top achievements
Rank 2
answered on 17 Feb 2011, 12:56 PM
Hi Daniel,

I will see what I can find out and let you know if I do.
Richard
0
Daniel
Top achievements
Rank 1
answered on 17 Feb 2011, 01:00 PM
Hi Richard,

Just one more question, you know how to change the color of this arrow in the grid ?
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 17 Feb 2011, 01:05 PM
Hi,

this is the GridRowHeaderCellElement and the arrow comes from an image, therefore to change the colour of the arrow, you need to provide your own image.
Hope that helps
Richard
0
Daryl
Top achievements
Rank 1
answered on 26 Oct 2017, 05:52 PM
I am interested in this and I see there has been no answer. Does anyone have the answer on how to modify the Buttons in the Grouping Panel of the RadGridView using the VSB?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Oct 2017, 12:30 PM
Hello, Daryl,

Thank you for writing.  

In order to customize the elements from the group panel by using Visual Style Builder, you can refer to the attached screenshots which illustrate how to change to group view and customize the color for the GroupFieldElements.

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sandor
Top achievements
Rank 1
answered on 08 Feb 2019, 02:35 PM

Hi Dess!

Can you please explain how can I change GroupFieldElements background color with SetThemeValueOverride from the code?
I try to do it in this way, but doesn't work:

gridview.GridViewElement.GroupPanelElement.SetThemeValueOverride(VisualElement.BackColorProperty, Color.Red, "GroupFieldElement");

gridview.GridViewElement.GroupPanelElement.SetThemeValueOverride(LightVisualElement.DrawFillProperty, true, "GroupFieldElement");

gridview.GridViewElement.GroupPanelElement.SetThemeValueOverride(LightVisualElement.GradientStyleProperty, GradientStyles.Solid, "GroupFieldElement");

0
Dimitar
Telerik team
answered on 11 Feb 2019, 01:03 PM
Hello Santor,

You should call the SetThemeValueOverride method on each item:
private void RadGridView1_GroupByChanged(object sender, GridViewCollectionChangedEventArgs e)
{
    ChangeStyles();
}
 
public void ChangeStyles()
{
    var groupsContainer = radGridView1.GridViewElement.GroupPanelElement.FindDescendant<TemplateGroupsElement>();
 
    foreach (var item in groupsContainer.Children)
    {
        if (item is GroupElement)
        {
            var groupItem = item as GroupElement;
            foreach (GroupFieldElement fieldElement in groupItem.GroupingFieldElements)
            {
                fieldElement.SetThemeValueOverride(LightVisualElement.BackColorProperty, Color.Red, "");
                fieldElement.SetThemeValueOverride(LightVisualElement.DrawFillProperty, true, "");
                fieldElement.SetThemeValueOverride(LightVisualElement.GradientStyleProperty, GradientStyles.Solid, "");
            }
        }
    }
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Daniel
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Daryl
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Sandor
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or