Hi,
in my grid I'm using a DatePicker (for show and edit):
- How can I show only date and hide time?
- When I edit the cells with Datepicker the format of date is "MM/dd/yyyy", how can I convert it in "dd/MM/yyyy"?
Thanks.
<DataGridTemplateColumn Header="{StaticResource datagridDatetime}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding DateTime, Mode=OneWay, StringFormat='dd/MM/yyyy'}"></TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DatePicker SelectedDate="{Binding DateTime, StringFormat='dd/MM/yyyy'}" />
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>