Within my data source I can only retrieve month names. I need the month column sorted by when they occur in the year not alphabetically.
So I need the months to show January, February, etc not April, August etc
Can anyone help? Here is how I'm referencing the month column name:
<telerik:PivotGridColumnField DataField="month_name" DataFormatString="{0}" UniqueName="month_name" >
</telerik:PivotGridColumnField>
5 Answers, 1 is accepted
In the new version RadPivotGrid will provide an option for binding to custom type objects that implement IComparable which will allow you to sort and filter the fields according to your custom criteria.
I see that you have also opened a support ticket on the same subject, if you do not mind we will continue any further communication there in order to avoid duplicates posts.
Marin
the Telerik team
![](/forums/images/avatarimages/default.gif)
You can find an online example here:
http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/groupingbycustomobject/defaultcs.aspx
In the demo the Category field implements IComparable, you can use the same approach to provide custom criteria for sorting the months in your case.
Marin
the Telerik team
![](/forums/images/avatarimages/default.gif)
<
CellTemplate
>
<
asp:Label
runat
=
"server"
Text="<%# Me.GetMonthName(Container.DataItem)%>" />
</
CellTemplate
>
And that's it!
You'll have to refer to my other work-around on the PivotGrid losing Templates on PostBacks in order to resolve that issue.
![](/forums/images/avatarimages/default.gif)
http://www.telerik.com/community/forums/aspnet-ajax/pivotgrid/template-is-lost-when-fieldreorder-command-is-fired.aspx