Hello,
would it be possible to add "OnFocus" event to DropDownList as there is already "OnBlur" event?
Thanks
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
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/.