DatePicker binding

2 posts, 0 answers
  1. T.Y.
    T.Y. avatar
    17 posts
    Member since:
    Apr 2009

    Posted 30 Dec 2010 Link to this post

    Hi,
    I built a data grid using a data template and inside it is a RadDatePicker.
    The binding of the datepicker is two-way.
    but,when I change the date in the datepicker, the value isn't updated in the source,the binding works only one way,
    My code:
     <data:DataGrid Grid.Row="1" Name="FEToolDG" AutoGenerateColumns="False">
    <data:DataGrid.Columns>
    <data:DataGridTextColumn IsReadOnly="True" Header="Name" x:Name="Name" Binding="{Binding Name}" Width="150"/>

    <data:DataGridTemplateColumn Header="Service Date">
    <data:DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <telerikInput:RadDatePicker  SelectedDate="{Binding InServiceDate, Mode=TwoWay }" />
    </DataTemplate>
    </data:DataGridTemplateColumn.CellTemplate>
    <data:DataGridTemplateColumn.CellEditingTemplate>
    <DataTemplate >
    <telerikInput:RadDatePicker SelectedDate="{Binding InServiceDate, Mode=TwoWay}" />
    </DataTemplate>
    </data:DataGridTemplateColumn.CellEditingTemplate>
    </data:DataGridTemplateColumn>

     

     

     

    </data:DataGrid.Columns>
    </data:DataGrid

    Please help me,
    Thanks

  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 04 Jan 2011 Link to this post

    Hello T.Y.,

    You have to use SelectedValue instead the SelectedDate.

    Kind regards,
    Kaloyan
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
Back to Top