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

Set culture on property grid field (RadDatePicker)

1 Answer 23 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Naseem
Top achievements
Rank 1
Naseem asked on 07 May 2014, 02:35 AM
Hi,
I need to set culture on an editable property grid filed that is RadDatePicker.

<telerik:PropertyDefinition Binding="{Binding MarkerDate,Converter={StaticResource DateOnlyConverter},Mode=TwoWay}">
                    <telerik:PropertyDefinition.EditorTemplate>
                        <DataTemplate>
                            <telerik:RadDatePicker telerik:AutoBindBehavior.UpdateBindingOnElementLoaded="Value" Culture="{Binding Source={StaticResource PresentationManager}, Path=Culture}"/>
                        </DataTemplate>
                    </telerik:PropertyDefinition.EditorTemplate>
                </telerik:PropertyDefinition>
            </telerik:RadPropertyGrid.PropertyDefinitions>


DateOnlyConverter convert the date to specific format. for example 'MM/dd/YYYY'
Culture is set to RadDatePicker. For example 'en-US'

However this code crashes and it seems it has got something to do with AutoBindbehavior , because the above setting works fine in whole of the project except in PropertyGrid. If I remove AutoBindBehavious it won't crash but the code doesn't work as expected.

Your help is greatly appreciated,

1 Answer, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 08 May 2014, 03:39 PM
Hello Naseem,

I attached a sample project based on your code snippet that uses AutoBindBehavior and shows a different Culture in the RadDatePicker in the EditorTemplate. However, I'm not sure I understand what you have in mind. If this is not what you are looking for could you please provide us with more information about your scenario and modify the sample project in a way that it reproduces the exception ?

We are looking forward to your reply.

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
PropertyGrid
Asked by
Naseem
Top achievements
Rank 1
Answers by
Boris
Telerik team
Share this question
or