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

Calendar format culture in RadGridView

2 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fransiscus Setiawan
Top achievements
Rank 1
Fransiscus Setiawan asked on 20 Jul 2010, 02:17 AM
Hi All,

I have a question where I have this date column and it has DateConverter that i created to apply the current thread culture. The problem that I have is
-On load it display the date format perfectly based on the current culture
-The problem is when i double click the cell/edit mode then it applies different format but then when i exit edit mode then it shows the right formatting

e.g
on load the cell display 07/08/2010 (07th August 2010) but when I go to edit mode it shows as 08/07/2010 (08th July 2010) but again when I finish editing then it shows 07/08/2010

so basically my current thread date format is dd/mm/yyyy but in edit mode it applies the us formatting which is mm/dd/yyyy

I've been googling  to find an answer to this but it doesn't result in anything

How to use the EditorStyle property of the column to customize the Culture property of the RadDatePicker. and how to apply the .NET culture to the telerik culture. Could you please show me how to resolve this issue in code behind (VB) instead of XAML file since our columns are dynamic.

Cheers

Fransiscus

2 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 21 Jul 2010, 08:48 AM
Hi Fransiscus Setiawan,

 You would need to set the CellEditorTemplate property of the column and place there a DataTemplate containing a RadDateTimePicker configured with the correct culture and format. This is the preferred approach, although EditorStyle should also be viable.

Sincerely yours,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Fransiscus Setiawan
Top achievements
Rank 1
answered on 22 Jul 2010, 08:05 AM
Thank you mate. Actually I resolve it with the language attributes

Dim _LocaleLanguage as String = String.Empty
   
_LocaleLanguage = CultureInfo.CreateSpecificCulture(System.Web.HttpContext.Current.Request.UserLanguages(0)).Name.ToString()
   
dgResults.Language = Windows.Markup.XmlLanguage.GetLanguage(_LocaleLanguage)
Tags
GridView
Asked by
Fransiscus Setiawan
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Fransiscus Setiawan
Top achievements
Rank 1
Share this question
or