Unplanned
Last Updated: 25 Jul 2024 07:14 by ADMIN
VladimirM
Created on: 30 Jun 2021 12:05
Category: DropDownList
Type: Feature Request
8
Add OnFocus event to DropDownList

Hello,

would it be possible to add "OnFocus" event to DropDownList as there is already "OnBlur" event?

Thanks

4 comments
ADMIN
Svetoslav Dimitrov
Posted on: 25 Jul 2024 07:14

Hello everyone who follows this feature request,

I can confirm that we are committed to implementing this feature request. At that point, I am not able to commit to any estimate. I can offer a simple workaround by wrapping the DropDownList in a <span> or another HTML element with the @onfocusin event and, in the event handler of the onfocusin, handle the scenario that you are after:

<span @onfocusin="@OnFocusInHandler">
    <TelerikDropDownList Data="@myDdlData" TextField="MyTextField" ValueField="MyValueField" @bind-Value="selectedValue">
    </TelerikDropDownList>
</span>

@Result

@code {
    private void OnFocusInHandler(FocusEventArgs args)
    {
        Result = "The DropDownList received focus";
    }

    private string Result { get; set; }

    //in a real case, the model is usually in a separate file
    //the model type and value field type must be provided to the dropdpownlist
    public class MyDdlModel
    {
        public int MyValueField { get; set; }
        public string MyTextField { get; set; }
    }

    int selectedValue { get; set; } = 3;

    IEnumerable<MyDdlModel> myDdlData = Enumerable.Range(1, 20).Select(x => new MyDdlModel { MyTextField = "item " + x, MyValueField = x });
}

Regards,
Svetoslav Dimitrov
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

VladimirM
Posted on: 18 Jul 2024 10:57
Hello, it has been three years... Are there any plans to implement this?
Randy
Posted on: 17 Jun 2022 18:04
OnFocus could be useful for all of the editor fields.
ADMIN
Svetoslav Dimitrov
Posted on: 07 Jul 2021 07:11

Hello Vladimir,

Thank you for your suggestion for adding an OnFocus event for our DropDown components. I have marked this item as "Unplanned". This means that it is a valid feature request and we are committed to implementing it. 

Regards,
Svetoslav Dimitrov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.