Hi,
when hitting return/enter after editing the DateTimePicker's value (its actually enough when it gets keyboard-focus) a System.NullReferenceException is thrown.
repro-code:
Best Regards
Steffen
when hitting return/enter after editing the DateTimePicker's value (its actually enough when it gets keyboard-focus) a System.NullReferenceException is thrown.
repro-code:
| namespace RadGridViewFocusBug |
| { |
| /// <summary> |
| /// Interaction logic for Window1.xaml |
| /// </summary> |
| public partial class Window1 : Window |
| { |
| public Window1() |
| { |
| InitializeComponent(); |
| ObservableCollection<BusinessObject> col = new ObservableCollection<BusinessObject>(); |
| col.Add(new BusinessObject() { Arrival = DateTime.Now }); |
| col.Add(new BusinessObject() { Arrival = DateTime.Now }); |
| col.Add(new BusinessObject() { Arrival = DateTime.Now }); |
| this.DataContext = col; |
| } |
| } |
| public class BusinessObject |
| { |
| public DateTime Arrival { get; set; } |
| } |
| } |
| <Window x:Class="RadGridViewFocusBug.Window1" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
| Title="Window1" Height="300" Width="300"> |
| <Grid> |
| <telerik:RadGridView ItemsSource="{Binding}" AutoGenerateColumns="False"> |
| <telerik:RadGridView.Columns> |
| <telerik:GridViewDataColumn Header="Arrival" > |
| <telerik:GridViewColumn.CellTemplate> |
| <DataTemplate> |
| <telerik:DateTimePicker SelectedDateTime="{Binding Path=Arrival, Mode=TwoWay}"/> |
| </DataTemplate> |
| </telerik:GridViewColumn.CellTemplate> |
| </telerik:GridViewDataColumn> |
| </telerik:RadGridView.Columns> |
| </telerik:RadGridView> |
| </Grid> |
| </Window> |
Best Regards
Steffen