Okay, I've got a DataGrid that is displaying data from our database, except when it runs across a NULL datetime value in the database it displays it as "1/1/0001 12:00:00 AM". I'd MUCH rather have it show an empty field in that case... how do I get it to do that?
This is how I've got the control defined in the DataGrid's XAML.
I'm using .NET 4.5 in a wpf app...Code:<DataGridTemplateColumn Header="Start Date"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding EffDateBegin}"/> </DataTemplate> </DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <DatePicker SelectedDate="{Binding EffDateBegin}"/> </DataTemplate> </DataGridTemplateColumn.CellEditingTemplate> </DataGridTemplateColumn>


Reply With Quote

