Enable keyboard navigation for DatePicker in Filter row of GridDateTimeColumn

4 posts, 0 answers
  1. Sheng
    Sheng avatar
    6 posts
    Member since:
    Jul 2019

    Posted 20 Sep Link to this post

    In my RadGrid, the AllowFilteringByColumn is set to "true".

    In the filter row of a GridDateTimeColumn, there's the DatePicker. How can I enable keyboard navigation for the popup calendar?

  2. Rumen
    Admin
    Rumen avatar
    14105 posts

    Posted 25 Sep Link to this post

    Hi Sheng,

    The official solution after R3 2019 (2019.3.917) is to get reference to the picker and enable its keyboard navigation setting:

     

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            var picker = (RadTimePicker)item["Times"].Controls[0];
            picker.SharedCalendar.EnableKeyboardNavigation = true;
            picker.SharedTimeView.EnableKeyboardNavigation = true;
            picker.EnableKeyboardNavigation = true;
                    
        }
    }

    Another approach is to use GridTemplateColumn as shown below:

    <Columns>
        <telerik:GridTemplateColumn UniqueName="Dates">
            <EditItemTemplate>
                <telerik:RadDateTimePicker RenderMode="Lightweight" ID="RadTimePicker1" Width="281px" runat="server" EnableKeyboardNavigation="true"></telerik:RadDateTimePicker>
            </EditItemTemplate>
        </telerik:GridTemplateColumn>

    Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Sheng
    Sheng avatar
    6 posts
    Member since:
    Jul 2019

    Posted 27 Sep in reply to Rumen Link to this post

    Thank you!
  4. Rumen
    Admin
    Rumen avatar
    14105 posts

    Posted 30 Sep Link to this post

    You are welcome, Sheng!

    Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top