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

Leave a Reply