Welcome to the Xceed Community | Help
Community Search  
More Search Options

Xceed WPF Grid DatePicker

Sort Posts: Previous Next
  •  03-21-2012, 12:17 PM Post no. 31866

    Xceed WPF Grid DatePicker

    After selecting a date from datepicker, the new value doesn't get saved in the grid. It defaults back to whatever date was before

    Below is the grid xaml code 

    <xcdg:Column FieldName="CompletedDate" Title="CompletedDate" Width="110">

    <xcdg:Column.CellEditor>

    <xcdg:CellEditor>

    <xcdg:CellEditor.EditTemplate>

    <DataTemplate>

    <xcdg:DatePicker Name="dpCompletedDate" Background="{DynamicResource LightBrush}" Foreground="{DynamicResource TextBlockForeGround}" HorizontalAlignment="Left" Height="20" Width="100" />

    </DataTemplate>

    </xcdg:CellEditor.EditTemplate>

    </xcdg:CellEditor>

    </xcdg:Column.CellEditor>

    </xcdg:Column>

     Does any one have a solution for this? Whats going wrong here?

  •  03-21-2012, 8:53 PM Post no. 31868 in reply to 31866

    Re: Xceed WPF Grid DatePicker

    Hi Anand,

    You must set the SelectedDate property to {xcdg:CellEditorBinding}. 

    Here's how: 

     <xcdg:Column.CellEditor>

                         <xcdg:CellEditor>

                            <xcdg:CellEditor.EditTemplate>

                               <DataTemplate>

                                  <xcdg:DatePicker SelectedDate="{xcdg:CellEditorBinding}" Name="dpCompletedDate" Background="Yellow" HorizontalAlignment="Left" Height="20" Width="100" />

                               </DataTemplate>

                            </xcdg:CellEditor.EditTemplate>

                         </xcdg:CellEditor>

                      </xcdg:Column.CellEditor>

    Best Regards,

    Michel Dahdah
    Technical Support
    Xceed Software inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.