Last Updated: 29 Apr 2022 09:55 by ADMIN
Release 3.3.0
Created on: 27 Oct 2021 22:36
Category: DropDownList
Type: Bug Report
DropDownList should clear selection when bind value is set to null (or the default) and no default value is set

The following knowledge base article describes how to select the default value in a drop down, but if there's no default value the selection is not cleared using this method.

When setting the bind value to null (or the default, or frankly anything that doesn't exist in the drop down) I'd like the drop down list selection to be cleared when there's no default value set on the DropDownList.


@page "/"

<br />

<TelerikButton OnClick="@ClearSelection">Clear selection</TelerikButton>
<TelerikDropDownList Data="@data" @bind-Value="selectedValue" />

@code {
    List<string> data = new() { "selection" };
    string selectedValue;

    void ClearSelection()
        // This does not cause the drop down to clear the selection and I think it should.
        selectedValue = null;

1 comment
Hristian Stefanov
Posted on: 01 Nov 2021 10:39

Hi Doug,

I'm changing the type of this public item to a "Bug Report" and marking it as "Unplanned".

You can continue tracking the status of the bug report here.

Hristian Stefanov
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.