Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi,
By default one date in the Picker of a DateTimeColumn is shown in MM/dd/yyyy format. To change this, I need to set the PickerFormat parameter in my grid, right?
I'm developing an ASP.NET application that will work in multiple languages. Thus, when in Portuguese, the date of the Picker of a DateTimeColumn should be shown in "dd/MM/yyyy" format, whereas when in English, should be in "MM/dd/yyyy" format. The choice of language will be made at runtime.
So, how can I set the PickerFormat of the grid at runtime?
Thanks in advance,
Marcelo Camarate
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, You will need to modify the corresponding ItemTemplate's DatePicker object. First, you will need to make sure you have a <eo:DateTimeColumn> inside the Grid's ColumnTemplates collection. You can then use the following code:
Code: C#
//Get the template column
EO.Web.DateTimeColumn template =
(EO.Web.DateTimeColumn)Grid1.ColumnTemplates[column_index];
//Modify its PickerFormat
template.DatePicker.PickerFormat = new_format;
Hope this helps. Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi,
It's working fine. Thank you so much.
Regards,
Marcelo Camarate
|