Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Arrow keys not working to move around cells in grid

Arrow keys not working to move around cells in grid

New Discussion
John Price
John Price asked on May 20, 2015 9:45 AM

We upgraded to 15.1 and now the arrow keys do not move the cursor around in the grid (they did before this upgrade), except if the cells are disabled.  Then they work.  But for cells that are enabled for data entry the arrow keys are not working.  What property do we need to set to get them to work now.

 

Thanks,

 

John Price

Sign In to post a reply

Replies

  • 0
    Nadia Robakova
    Nadia Robakova answered on May 7, 2015 9:45 AM

    Hi John,

    Thank you for using our forum!

    To enable keyboard navigation with arrow keys you have to enable feature Activation.

    Let me know if I may be of further assistance.

    • 0
      John Price
      John Price answered on May 7, 2015 3:38 PM

      Hi Nadia, thanks for your answer but maybe I'm not understanding correctly.

      If I look at the properties for Behaviors, I see Activation.  When I expand Activation the Enabled property is set to True but the arrow keys still do not work.  Do I need to set any other properties under Activation – such as one or all of the ActivationClientEvents (ie, ActiveCellChanged, ActiveCellChanging, Initialize)?

      John

       

      • 0
        Nadia Robakova
        Nadia Robakova answered on May 8, 2015 6:57 AM

        Hi John,

        However I was not able to reproduce the behaviour that you're seeing on your side. I have attached the sample project I used to test this. Please test this project on your side; whether or not it works correctly may help indicate the nature of this issue.

        If this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

        Please let me know if I can provide any further assistance.

      • 0
        Dana
        Dana answered on May 8, 2015 3:45 PM

        Hi Nadia,

        Thank you for your reply and the sample. I realized that we didn’t specify that we see the problem with arrows not moving up and down when grid cells are in edit mode. When cells are not editable, then up and down arrows work, just like in your example. But our client’s requirement is that in edit mode, they should to be able to navigate up and down the cells using arrow keys. Please see attached sample – when you click on a cell, for example Cost Rate on “Other Expense” row, it “turns” into edit mode. From there, click down arrow, and the cursor does not move to the row below.

        In v 13.1 we were using grid client event KeyDown to catch and override up and down arrows behavior. But in v 15.1 KeyDown event is not fired on up and down key in edit mode. Could you please provide a solution for this problem?

        Thank you!

        Dana K

      • 0
        John Price
        John Price answered on May 12, 2015 3:18 PM

        Nadia,

         

        Have you had a chance to look at Dana's code sample posted here?  We could sure use some help.

         

        Thanks,

         

        John

      • 0
        Nadia Robakova
        Nadia Robakova answered on May 13, 2015 8:02 AM

        Hi John,

        To can navigate with arrow keys when a cell is in edit mode you should use client event KeyDown and if the arrow key down is pressed you have to close cell edit mode and to open the next cell in edit mode.

        I am attaching a small sample with that.

        Let me know if I may be of further assistance.

      • 0
        Dana
        Dana answered on May 13, 2015 4:46 PM

        Hi Nadya,

        Thank you for providing the sample. We finally narrowed the problem down to having an editor in EditingColumnSetting for a column. Please see attached example, you’ll see that Cost Rate column works with up and down arrows, but column Cost Rate Currency that is using TextEditorProvider is not responding to up and down keys.

        Thank you!

        Dana K

      • 0
        John Price
        John Price answered on May 13, 2015 5:04 PM

        Nadia, to Dana's point, the EditorID is preventing the up and down arrows from firing grid_keydown handler.   However, side to side arrows do fire it.  Can you tell us why that is?

        Thanks,

         

        John

      • 0
        Nadia Robakova
        Nadia Robakova answered on May 14, 2015 8:08 AM

        Hi John and Dana,

        When you have a cell editor provider and there press key the keydown event for the grid is not fired, but the editor event keydown is fired. This is because otherwise you will have 2 same events firing.

        In you code you just have to add handler for the keydown event for the editor:

           <EditorProviders>

               <ig:TextEditorProvider ID="TextEditorProvider500">

                       <EditorControl ClientIDMode="Predictable" MaxLength="500" CssClass="grideditor" ClientEvents-KeyDown="WebDataGrid1_Grid_KeyDown" />

                </ig:TextEditorProvider>

           </EditorProviders>

        Please let me know if I can provide any further assistance.

      • 0
        Dana
        Dana answered on May 18, 2015 3:24 PM

        Hi Nadya,

        We added the event KeyDown for the EditoControls (text, numeric, dates) and the arrow keys started to work with editor controls , but now there is an issue with value in the cell containing editor control:

        • Enter into edit mode on the top cell for Cost Rate (by clicking on the cell)
        • Change 1.99 to 2.55
        • Hit down arrow, the value in the top cell changes back to 1.99

        Please advise.

        Thanks!

        Dana K

      • 0
        Nadia Robakova
        Nadia Robakova answered on May 19, 2015 6:55 AM

        Hi Dana,

        To keep the changed value in the KeyDown event you have to change  editng.exitEditMode(); to  editng.exitEditMode(true);.

        When you add parameter true in the function exitEditMode the entered value will be saved if you call it without parameters or with parameter false, the old value will be returned.

        Let me know if I may be of further assistance.

      • 0
        Dana
        Dana answered on May 19, 2015 3:36 PM

        Hi Nadya!

        Thank you for your quick reply! That did the trick, now up and down arrows are working according to our specs. Thank you again!

        Dana K

      • 0
        John Price
        John Price answered on May 19, 2015 11:08 PM

        Thank you both for taking care of this.  Nadia, your fast responses to Dana and I were very much appreciated.

         

        John

      • 0
        Nadia Robakova
        Nadia Robakova answered on May 20, 2015 9:45 AM

        Thank you for your replies. Glad you were able to resolve the issue.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
John Price
Favorites
0
Replies
14
Created On
May 20, 2015
Last Post
10 years, 9 months ago

Suggested Discussions

Created by

Created on

May 20, 2015 9:45 AM

Last activity on

Feb 20, 2026 11:36 AM