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

Group by column value instead of datafield value

1 Answer 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rh
Top achievements
Rank 1
rh asked on 24 Aug 2008, 05:57 PM
I have a grid that has a column that has its value set in the ItemDataBound event. This is because I'm binding to a complex object model and I have to perform some business logic in the itemdatabound to determine the column value.

I want to group on this column but I get an error when setting the groupbyexpression to the UniqueName of the column. I'm presuming this is because the groupbyexpressions is looking for a field in the datasource with the field name rather than using the columns in the grid.

Is there a way to get the grid to group by the values in the grid column rather than the values in the datasource?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 27 Aug 2008, 07:22 AM
Hi rh,

The current grouping mechanism requires a datafield set to a field in the underlying database, in order to allow its normal functioning.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
rh
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or