kendo dropdownlist default item styling

1 Answer 386 Views
DropDownList
sai dheeraj
Top achievements
Rank 1
sai dheeraj asked on 12 Dec 2023, 04:22 AM

Hi I am trying to style default item select in my project but when i inspect select item in browser through element it is showing Kendo-popup k-animation-container k-animation-container-shown but it is not showing default item elements select to change the styling for the default item select can you please let me know what class will be for default item select to change styling

https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdownlist/default-item/

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 13 Dec 2023, 07:02 PM

Hello Sai,

In order to style the default item of the Kendo UI DropDownList, use the following CSS:

.k-list-optionlabel,
.k-list-optionlabel:hover {
  color: red;
}
     
.k-selected.k-list-optionlabel,
.k-selected.k-list-optionlabel:hover {
  color: #ffffff;
  background-color: red;
}

Here's a StackBlitz example where I have styled the default item of the DropDownList. Make sure to set the encapsulation to ViewEncapsulation.None to apply the style locally.

For future, to get any class name of any popup component, use the preventDefault method in the close event of that component and inspect the element.

I hope this information helps. Let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
DropDownList
Asked by
sai dheeraj
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or