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

JumpList GroupHeader format

1 Answer 56 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Oleg
Top achievements
Rank 1
Oleg asked on 07 Dec 2012, 10:02 AM
Hi,

i want to format group header in this way:

it is datetime, so regarding to http://www.telerik.com/community/forums/windows-phone/jumplist/groupformatstring-how.aspx#1655805

i've wrote 
public void GroupByDate(string s) {
    GenericGroupDescriptor<Program, DateTime> gd = new GenericGroupDescriptor<Program, DateTime>();
 
    gd.GroupFormatString = "{0:ddd MM MMM}";
     
    gd.KeySelector = (Program p) => {
        return p.StartTime.Date;
    };
     
    this.PlanningList.GroupDescriptors.Add(gd);
}
I need to set this date only in en-US locale. How can i implement it?

In case of normal datetime, i use this:
DateTime.Now.ToUniversalTime().ToString(format, new CultureInfo("en-US"))
Thank you!

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 12 Dec 2012, 09:51 AM
Hi Oleg,

Thanks for writing and for your question.

The format strings are always in the context of the current culture on the phone. You cannot explicitly define the culture in the format string itself.

A possible way to implement this is to define a new property on your business object which is of type string, assign the already formatted group key to it and group by this property.

I hope this helps.

Greetings,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
JumpList
Asked by
Oleg
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or