InputMode="DateTimePicker" inside a WPF DataGrid Column

3 posts, 1 answers
  1. Neill
    Neill avatar
    2 posts
    Member since:
    Oct 2013

    Posted 08 Oct 2013 Link to this post

    Hello,
    I am trying to use a RadTimePicker with the InputMode property set to "DateTimePicker" inside a DataGrid column. I have the following XAML code:

    <DataGrid>
    ...
      <DataGrid.Columns>
    ...
        <DataGridTemplateColumn Header="ETA">
            <DataGridTemplateColumn.CellTemplate>
               <DataTemplate>
                  <telerik:RadTimePicker InputMode="DateTimePicker" SelectedValue="{Binding ETA}"/>     
               </DataTemplate>   
             </DataGridTemplateColumn.CellTemplate>
          </DataGridTemplateColumn>
    ...
    </DataGrid.Columns>
    ...
    </DataGrid>
     However, the InputMode property seems to be ignored and the control is appearing as only a TimePicker. I have tested other properties and of the ones i tested, this is the only one that seems to be ignored.

    Am i doing something wrong or is this a bug?
  2. Answer
    Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 08 Oct 2013 Link to this post

    Hi Neil,

    You can use RadDateTimePicker instead of RadTimePicker:
    <DataGrid.Columns>
        <DataGridTemplateColumn Header="ETA">
            <DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <telerik:RadDateTimePicker SelectedValue="{Binding ETA}"/>
                </DataTemplate>
            </DataGridTemplateColumn.CellTemplate>
        </DataGridTemplateColumn>
    ....

    Hope this helps.

    Regards,
    Rosen Vladimirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Neill
    Neill avatar
    2 posts
    Member since:
    Oct 2013

    Posted 08 Oct 2013 Link to this post

    Great, cheers!
Back to Top