Completed
Last Updated: 23 Jan 2020 15:54 by ADMIN
Release 2.7.0
Joshua
Created on: 03 Dec 2019 12:59
Category: ComboBox
Type: Bug Report
1
Cannot clear Value upon selection

I want to capture the user selection (which has to happen through ValueChanged, as OnChange does not fire when I need it). At this point I want to use the selection from the user and to clear the combo box.

I would expect that this should work but it does not:

 

@result
<br />
from model: @MyItem
<br />
<br />
<TelerikComboBox Data="@MyList" Value="@MyItem" ValueChanged="@( (string v) => MyValueChangeHandler(v) )" Placeholder="Choose something">
</TelerikComboBox>

@code {
    string result;
    private async Task MyValueChangeHandler(string theUserChoice)
    {
        result = string.Format("The user chose: {0}", theUserChoice);

        MyItem = null; // this should be enough

    }
    protected List<string> MyList = new List<string>() { "first", "second", "third" };
    protected string MyItem { get; set; } = "second";
}

4 comments
Marco
Posted on: 23 Jan 2020 15:03

Hi Marin,

We did find a way around, we had to change to use a nullable to an empty string, but let me tell you that we are definitely not impressed with Telerik at this point, but let's see how it goes.

Thanks for replying back.

ADMIN
Marin Bratanov
Posted on: 23 Jan 2020 14:53

Hello Marco,

This is fixed. You can check the status and the release at the upper left corner, and the statuses are explained on the right (I am attaching a screenshot to illustrate this).

At the moment, there is a remaining issue with nullable types that will be fixed in 2.7.0 that should be out next week. To make this clearer I updated the status.

I also want to assure you that we are committed to providing a comprehensive and feature rich set of components, and we are building native components from the ground up, without any jQuery wrappers and dependencies. We are also among the first (if not the first) component suite to offer accessibility and keyboard navigation, and globalization and localization. With such "big rock" types of features in place, you can already build complete production-ready applications.

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Marco
Posted on: 23 Jan 2020 14:28

Is this completed already? Using a dropdown list is definitely not an option. How come Telerik is missing so many basic features even though it has been building UI controls for years.

It seems it is time to change to Syncfusion.

ADMIN
Marin Bratanov
Posted on: 03 Dec 2019 13:10

Hello Joshua,

For the time being, you can use a dropdownlist:

from the handler: @result
<br />
from model: @MyItem
<br />
<br />
<TelerikDropDownList Data="@MyList" Value="@MyItem" DefaultItem="@DdlPlaceholder" ValueChanged="@( (string v) => MyValueChangeHandler(v) )">
</TelerikDropDownList>

@code {
    string result;

    private void MyValueChangeHandler(string theUserChoice)
    {
        result = string.Format("The user chose: {0}", theUserChoice);

        MyItem = "Select Something"; // when binding to a full model, use the correct value for the default item
    }

    protected List<string> MyList = new List<string>() { "first", "second", "third" };

    protected string MyItem { get; set; } = "second";

    string DdlPlaceholder { get; set; } = "Select Something";
}

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor