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

[Solved] Grouping by nested object

1 Answer 178 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aleksei
Top achievements
Rank 1
Aleksei asked on 06 Aug 2009, 08:44 AM
    Hello !
for example my radgrid datasource is Product table , and every product is related to another table ProductType.
is it possible to group radgrid by product types?

 i tryed this syntax : 

    <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldAlias="Type" FieldName="ProductType.Name"></telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="ProductType.Name" SortOrder="Ascending"></telerik:GridGroupByField>
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>

but, without any luck.

Thank You !

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 11 Aug 2009, 07:52 AM
Hi Aleksei,

To make sure that the control is properly grouped, the filed that you are trying to group by, must be a part of the underlying datasources, to which the grid is databound. If there are two datatables, you can construct one, and bind the control to it. In any case, the field that you group on, must be a part of the datasource of the grid control.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Aleksei
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or