This question is locked. New answers and comments are not allowed.
Hi
I need details on how to set the DisplayValueFormat in RadTimeSpanPicker programmatically. Keeps giving me a format error with all my attempts to blindly work out the format structure.
Require “h:mm” but gives me a format exception error.
Kind regards
Steven Baker
4 Answers, 1 is accepted
0
Hello Steven,
RadTimeSpanPicker internally uses the TimeSpan.ToString() method to format the value string. You can take a look at MSDN for details on what format strings are supported.
As for your particular case: try using "h\:mm" and let me know if it works.
Thanks for your time.
Kind regards,
Deyan
the Telerik team
RadTimeSpanPicker internally uses the TimeSpan.ToString() method to format the value string. You can take a look at MSDN for details on what format strings are supported.
As for your particular case: try using "h\:mm" and let me know if it works.
Thanks for your time.
Kind regards,
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.
0
Steven
Top achievements
Rank 1
answered on 18 Dec 2012, 06:49 AM
Hi Deyan
Steven
RadTimeSpanPicker breaktime = new RadTimeSpanPicker();
breaktime.DisplayValueFormat = "h\:mm";
This gives me the pre compile error "Unrecognized escape sequence" highlighting the colon.
Maybe your example below refers to a Xaml example but not the same in code.
Steven
0
Steven
Top achievements
Rank 1
answered on 18 Dec 2012, 06:55 AM
Sorry for last post I worked it out.
breaktime.DisplayValueFormat = "h':'mm";
colon needs to be in quotes.
Regards
Steven
breaktime.DisplayValueFormat = "h':'mm";
colon needs to be in quotes.
Regards
Steven
0
Hi Steven,
Thanks for writing back.
We will consider this thread closed for now.
Do not hesitate to right us back in case you need further assistance.
Kind regards,
Deyan
the Telerik team
Thanks for writing back.
We will consider this thread closed for now.
Do not hesitate to right us back in case you need further assistance.
Kind regards,
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.