Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
945
UnboundColumn format string
posted

I have successfully got a UnboundColumn with a value converter to produce a DateTime object, however the column displays the long format string of datetime and in US culture.

How can I change the format of the column.

Have tried DataTemplate both assigned to itemtemplate of unboundcolumn and default type template, I think the problem here is that the object is the wrong type (not DateTime)

Any ideas

Parents
  • 945
    Verified Answer
    Offline posted

    Good to try writing stuff down...

    Found a solution

    <ig:UnboundColumn Key="Date" ValueConverter="{StaticResource dateConverter}" HeaderText="Date">

    <ig:UnboundColumn.ItemTemplate>

    <DataTemplate>

    <TextBlock Text="{Binding Value, StringFormat={}{0:dd/MM/yyyy}}"/>

     </DataTemplate>  

    </ig:UnboundColumn.ItemTemplate>

                                               

    </ig:UnboundColumn>

Reply Children
No Data