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

Problems with GroupByExpressions

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 02 May 2012, 04:10 PM
Hi,

I have a problem with SortOrder for SelectFields in GridGroupByExpressions when i change to "Descending". Only works for "Ascending". 

When i change to "Descending" i got an error at the designer in VS .NET. i attached an image with the error.

The code for the grid is:

<GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="OrderNumber" />
                        </GroupByFields>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="OrderNumber" FieldAlias="OrderNumber" HeaderText="Ordem"
                                SortOrder="Ascending" />
                            <telerik:GridGroupByField FieldName="OrderID" FieldAlias="OrderID" HeaderText="Ítens"
                                Aggregate="Count" />
                            <telerik:GridGroupByField FieldName="ProductAmount" FieldAlias="GroupTotal" Aggregate="Sum"
                                HeaderText="Total" />
                            <telerik:GridGroupByField FieldName="OrderStatus" FieldAlias="OrderStatus" HeaderText="Status" />
                        </SelectFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 May 2012, 07:13 AM
Hello Manuel,

SortOrder specifies how group values are sorted. Its value can be "Ascending" or "Descending". This property is only used for fields in the GroupByFields collection. Also check this help documentation which explains the same.
aspx:
<GroupByExpressions>
     <telerik:GridGroupByExpression>
      <SelectFields>
       <telerik:GridGroupByField FieldName="OrderNumber" />
      </SelectFields>
      <GroupByFields>
       <telerik:GridGroupByField FieldName="OrderNumber" SortOrder="Descending" />
     </GroupByFields>
  </telerik:GridGroupByExpression>
</GroupByExpressions>

Thanks,
Shinu.
Tags
Grid
Asked by
Manuel
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or