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

Rad Grid Shift+Arrow Key for selection not working in IE11

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
prajwal
Top achievements
Rank 1
prajwal asked on 07 Oct 2015, 12:19 PM

Hello,

I want row selection when Shift + U​p or Down arrow key is press in RadGrid but not working in IE 11 specifically. My Telerik dll is 2011.1.519.35.

My Code is as follows

<telerik:RadGrid ID="dgHistory" runat="server" AutoGenerateColumns="false" onkeydown="CheckShiftKey(this,event)"
    AllowSorting="false" AllowMultiRowSelection="True" GridLines="None" Height="0px">
    <PagerStyle AlwaysVisible="false" />
    <SelectedItemStyle CssClass="ToothChartSelected" />
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    <MasterTableView DataKeyNames="ChartHistoryID">
        <HeaderStyle CssClass="ChartingRadGridColumnHeader" />
        <ItemStyle CssClass="ChartingRadGridRow" VerticalAlign="Top" />
        <Columns>
            <telerik:GridBoundColumn DataField="RType" HeaderText="Type" Display="false"
                UniqueName="RecordType" HeaderStyle-Width="80px">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="RID" HeaderText="ID" Display="false" UniqueName="RecordID"
                HeaderStyle-Width="50px">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ID" HeaderText="OID" Display="false" UniqueName="OID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DDate" HeaderText="Date" UniqueName="DisplayDate"
                HeaderStyle-Width="55px" DataFormatString="{0:MM/dd/yy}">
            </telerik:GridBoundColumn>
       
        </Columns>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true" EnableAlternatingItems="false" AllowKeyboardNavigation="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
        <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" EnableRealTimeResize="true" />
        <ClientEvents OnRowDataBound="function(s,e){ RowDataBound(s,e);}"  OnKeyPress="CheckShiftKey"
            OnRowContextMenu="OnContextMenu" OnRowClick="OnLeftClick" OnGridCreated="function(s,e){ BindGridHotkeys(s,e); SetHistoryGridHeight(s, e); tc$.historyGridCo=s;}"
            OnRowSelected="RowSelected" OnRowDblClick="onrowdblclick" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
        </Scrolling>
    </ClientSettings>
</telerik:RadGrid>​

and  client side script is

  function CheckShiftKey(sender, args) {
        var keyCode = args.get_keyCode();

        if (args.get_isShiftPressed()) {
            if (keyCode == 38 || keyCode == 40) {
                if (sender._activeRow != null) {
                    var nextRow = sender._getNextActiveRow(sender._activeRow, keyCode);
                    if (!nextRow) return;
                    var nextItem = $find(nextRow.id);
                    var currentItem = $find(sender._activeRow.id);
                    if (nextItem.get_selected()) {
                        currentItem.set_selected(false);
                    }
                }
            }
        }
    }

 

Thanks,

Prajwal Thakur

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Oct 2015, 08:07 PM
Hi,

Note that official support for IE 11 is introduced in Q3 2013 SP1. Therefore, in order to avoid similar problems you should upgrade to the latest version of UI for ASP.NET AJAX.

Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
prajwal
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or