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

Solved: Error Creating Control – Failed to create designer Telerik.Web.UI

After playing with references in your project, you may end up seeing your beloved Telerik controls in this annoying error box:

untitled-2

Error Creating Control – objectName
Failed to create designer ‘Telerik.Web.UI.RadDopDownList…’

Solution

This root cause of this issue is that a mismatch between the Telerik DLLs you referenced and the Telerik controls you have in your page.

In order to fix this issue, simply remove your Telerik references and add the ones whose version number match with the controls in your page.

Solved: “Telerik.Web.UI. GridGroupByException: Expression cannot be null or empty”

This issue may come out when you try to group table by a certain column in Telerik RadGrid:

Server Error in ‘/’ Application.
Expression cannot be null or empty
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Telerik.Web.UI.GridGroupByException: Expression cannot be null or empty

capture

Solution

The root cause of this issue is that there is no “group expression” defined for the column you are trying to use for grouping. Follow the steps below in order to solve the issue:

  1. In Design mode, click the RadGrid
  2. Expand the configuration menu and click “Open Configuration Wizard
  3. Click “MasterTableView
  4. Click “Columns
  5. Choose the column you want to use for grouping
  6. Enter expression into “GroupByExpression” field (Ex. “N_REQUEST_ID Group By N_REQUEST_ID”
    capture1

Reference: http://www.telerik.com/forums/gridgroupbyexception-expression-cannot-be-null-or-empty-f0b9e381526a