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

RadGridView.ControlPanel background color ?

4 Answers 182 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 15 Aug 2019, 06:16 PM
Hi,
How do I set the background color of the ControlPanel of the RadGridView ?
Barry

4 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 16 Aug 2019, 11:05 AM

Hello Barry,

To achieve this you can subscribe to the Loaded event of RadGridView and get the ItemsControl representing the control panel. Then you can set its Background property. Here is an example in code:

private void GridView_Loaded(object sender, RoutedEventArgs e)
{
	var controlPanel = this.gridView.ChildrenOfType<ItemsControl>().FirstOrDefault(x => x.Name == "PART_ControlPanelItemsControl");
	controlPanel.Background = Brushes.OrangeRed;
}

Read about the ChildrenOfType<T>()  method in the Visual Tree Helpers article.

Regards, Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Barry
Top achievements
Rank 1
answered on 16 Aug 2019, 06:39 PM

Thanks...it worked !

How about the part (row) that says "Drag a column header and drop it here to group by that column" ?

0
Barry
Top achievements
Rank 1
answered on 16 Aug 2019, 06:55 PM
ourGrid.GroupPanelBackground
0
Martin Ivanov
Telerik team
answered on 19 Aug 2019, 08:41 AM

Hello Barry,

That's right, you can set the background of the group panel via the GroupPanelBackground property of RadGridView.

Regards, Martin Ivanov
Progress Telerik

Get quickly onboarded 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
Barry
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Barry
Top achievements
Rank 1
Share this question
or