Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Shortcut keys for grid row navigation/editing/adding
posted

Hi,

There is  a requirement form client that they dont want to use mouse for adding/editing rows. Is there any built in functionality in igGrid through which we can add new rows/edit existing ones through the keyboard. The editMode for my grid is 'row' .

TAB key does not select the '+Add New Row' button on top of the grid. Is there any built in key bound to the grid for adding new rows & selecting existing ones through the keyboard.

How can I bind custom keys for grid adding/editing fucntionality.

Also how can I disable 'Done / Cancel' buttons without affecting the existing functionality of the grid. I mean will disabling "Done / Cancel" button affect exisiting functionality if autoCommit is set to false.

If possible, please provide MVC helper syntax , I am using MVC Helper for initialization of grid.

Thanks.

Parents
  • 16310
    Verified Answer
    Offline posted

    Hello Jimmy,

    Please find answers to your questions below.

    1) Going to the Add New Row

    If the grid is on focus you can go to the Add New Row with Shift + Tab (For example try seeting focus on the grid by clicking on some column header and then press Shift + Tab).

    If the grid is out of focus you can use Tab, which will start focusing on every page element one by one starting from the browser's address bar. However this is not that suitable if the focus should go through a lot of elements until it reaches the Add New Row.

    2) How can I bind custom keys for grid adding/editing functionality.

    You can use the startEditTriggers property of the grid - http://help.infragistics.com/jQuery/2014.2/ui.iggridupdating#options:startEditTriggers. You can set it so that pressing the Enter key over a cell will trigger edit mode. This is the razor syntax to do this:

    features.Updating().ShowDoneCancelButtons(false).StartEditTriggers(GridStartEditTriggers.Enter);

    3) Will disabling "Done / Cancel" button affect exisiting functionality

    Disabling the Done/Cancel button when autoCommit: false will not affect exisiting functionality. However in this case you will have to implement how the changes are commited. For an example how this can be done via a custom button please refer to this sample:

    http://www.igniteui.com/grid/basic-editing

    I hope this is helpful. Please do not hesitate to contact me if you have any further questions

Reply Children