Declined
Last Updated: 09 Jun 2020 13:56 by ADMIN
J
Created on: 29 Aug 2017 13:17
Category: DropDownList
Type: Feature Request
2
Dropdown initial item is unavailable
I have a usecase where the initial selected item is no longer present in the choices.
With the current behavior, the initial value is not displayed and the dropdown is empty.
Would it be possible to display the initial value with a 'disabled' css class in the dropdown?

Same for multiselects, etc.
1 comment
ADMIN
Martin
Posted on: 09 Jun 2020 13:56

Hi J,

It is possible to make the initial value disabled in the list by disabling the same item that is passed as an initial value:

https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdownlist/disabled-items/

https://stackblitz.com/edit/angular-rga55b?file=app/app.component.ts

Here is an example with MutliSelect component:

https://stackblitz.com/edit/angular-kuti7m?file=app/app.component.ts

What also can be done is to bind the [value] property to an item that is not included in the collection bound to the [data] property:

https://stackblitz.com/edit/angular-rga55b-eaxf8r?file=app/app.component.ts

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.