Hi,
I have a grid and in that i have by default sorting by date desc and default group by by date and i is by default expended. The problem is that the sorting order is desc of date but the date is only taking the date and the month part in the not measuring by the sorting.
Please see the attachment.
I have used following code for sorting and grouping
<SortExpressions >
<telerik:GridSortExpression FieldName="UpdatedDate" SortOrder="Descending"/>
</SortExpressions>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="UpdatedDate" SortOrder="Descending" FormatString="{0:yy/mm/dd}" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="UpdatedDate" />
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<GroupHeaderTemplate>
<asp:Label Text='<%#String.Format("{0:MM/dd/yy}", Eval("UpdatedDate"))%>' runat="server"
ID="lblDate" Style="font-weight: bold; color: Black;"></asp:Label>
</GroupHeaderTemplate>
I have a grid and in that i have by default sorting by date desc and default group by by date and i is by default expended. The problem is that the sorting order is desc of date but the date is only taking the date and the month part in the not measuring by the sorting.
Please see the attachment.
I have used following code for sorting and grouping
<SortExpressions >
<telerik:GridSortExpression FieldName="UpdatedDate" SortOrder="Descending"/>
</SortExpressions>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="UpdatedDate" SortOrder="Descending" FormatString="{0:yy/mm/dd}" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="UpdatedDate" />
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<GroupHeaderTemplate>
<asp:Label Text='<%#String.Format("{0:MM/dd/yy}", Eval("UpdatedDate"))%>' runat="server"
ID="lblDate" Style="font-weight: bold; color: Black;"></asp:Label>
</GroupHeaderTemplate>