Thursday, May 31, 2012

Formatting Date column of WPF XamDataGrid


xmlns:igEditors="http://infragistics.com/Editors"
xmlns:sys="clr-namespace:System;assembly=mscorlib"

 <Style TargetType="{x:Type igEditors:XamTextEditor}" x:Key="TheDateStyle">
        <Setter Property="Format" Value="dd/MMMM/yyyy" />
 </Style>


 <igDP:Field Name="CaseDate" Label="Case Date"  Visibility="Visible" Width="*">
                            <igDP:Field.Settings>
                                <igDP:FieldSettings EditAsType="{x:Type sys:String}"
                            EditorType="{x:Type igEditors:XamTextEditor}"
                            EditorStyle="{StaticResource TheDateStyle}" />
                            </igDP:Field.Settings>
                        </igDP:Field>

2 comments: