This is a migrated thread and some comments may be shown as answers.

Grouping Templated columns

2 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 04 Nov 2008, 05:24 PM

I have a radgrid with a templated column.  I've enabled grouping.  When I drag a column from the grid into the group header, I get the following error:

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

So I followed this thread:  http://www.telerik.com/community/forums/thread/b311D-bcmedm.aspx

It says to use a GroupExpression, which I did.  It resulted in the grid being grouped on startup (worked as expected).  However, when I remove the column from the grouping, and try to re-add it to the group, I get the following error:

Telerik.Web.UI.GridGroupByException: Invalid group by expression: 'Group By' clause missing

The templated column does in fact contain a GroupByExpression="disciplineID" expression.  So I am not sure what I am missing here.

Here are my needs:

1.  Allow grouping of templated columns.
2.  It cannot be grouped on startup of the grid.
3.  Must allow the addition and removal of the columns from the grouping at will.

Please let me know what I need to do.

Thanks for all your help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 07 Nov 2008, 01:04 PM
Hello Jim,

You should set proper value of the GroupExpression property of the GridTemplateColumn. Below is a link which explains how you can configure it
Expression Property

Attached to this forum post you can find sample application demonstrating this functionality.
I hope this helps.

Best wishes,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jim
Top achievements
Rank 1
answered on 07 Nov 2008, 01:34 PM
Thanks Nik!

Problem solved when you read the documentation fully!  :D
Tags
Grid
Asked by
Jim
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Jim
Top achievements
Rank 1
Share this question
or