This is a migrated thread and some comments may be shown as answers.

Enable keyboard navigation for DatePicker in Filter row of GridDateTimeColumn

3 Answers 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sheng
Top achievements
Rank 1
Iron
Iron
Sheng asked on 20 Sep 2019, 03:30 PM

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?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 25 Sep 2019, 02:33 PM

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.
0
Sheng
Top achievements
Rank 1
Iron
Iron
answered on 27 Sep 2019, 07:45 PM
Thank you!
0
Rumen
Telerik team
answered on 30 Sep 2019, 09:46 AM

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.
Tags
Grid
Asked by
Sheng
Top achievements
Rank 1
Iron
Iron
Answers by
Rumen
Telerik team
Sheng
Top achievements
Rank 1
Iron
Iron
Share this question
or