Different Color for Main Panel Versus Panel Items

1 Answer 78 Views
PanelBar
Sean
Top achievements
Rank 1
Iron
Iron
Sean asked on 02 Feb 2023, 04:43 AM

The background color of the Main panel item and the sub panel items.  Can someone help me set the background color of the subitems to something different.

For example, when I click on Q1 Forecast I would like it be Red to give a visual indication that you have selected a sub item.  Sales Forecast should remain Aqua Blue which is set from the Theme.

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 06 Feb 2023, 04:50 PM

Hello Sean,

Actually, in the demo the Sales Forecasts item is a sub item of Projects, i.e. the hierarchy is:

Projects -> Sales Forecasts -> Q1 Forecast

Nevertheless, if you want to set red background only to the third level of items, you can do that with this CSS rule:

.k-panelbar .k-panelbar-group > .k-panelbar-item.k-level-2 > .k-link.k-selected {
  background-color: red;
}

And if you want to include the second level of sub items, you can add another selector:

.k-panelbar .k-panelbar-group > .k-panelbar-item.k-level-1 > .k-link.k-selected,
.k-panelbar .k-panelbar-group > .k-panelbar-item.k-level-2 > .k-link.k-selected {
  background-color: red;
}

Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PanelBar
Asked by
Sean
Top achievements
Rank 1
Iron
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or