Quantcast
Channel: port135.com
Viewing all articles
Browse latest Browse all 306

How to set focus into Telerik RadListBox control?

$
0
0

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


Viewing all articles
Browse latest Browse all 306

Trending Articles