Home » Development » How to set focus into Telerik RadListBox control?

How to set focus into Telerik RadListBox control?

If user clicks a RadListBox control, control won’t be automatically in focus even though you can make selections in the control (I know, it’s unexpected). It may get tricky to set focus into control. Try the lines below.

function focusOnList() {
    var dropdownSource = $find("countryList"); 
    // var dropdownSource = $find("<%= countryList.ClientID %>");
    dropdownSource._getGroupElement().focus();
    console.log(dropdownSource);
}

Don’t forget to call this function when selected index is changed in your list:

<telerik:RadListBox ... OnClientSelectedIndexChanged="focusOnList">
...
</telerik:RadListBox>

References

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.

Leave a Comment