Selecting row with Tab Key navigation (without postback)

3 posts, 1 answers
  1. Jeff
    Jeff avatar
    10 posts
    Member since:
    Mar 2013

    Posted 09 Dec 2016 Link to this post

    Hello,

    I've looked through the forums with no luck for the specifics required.

    I have the need to select the current row of the grid where the cell is being edited.  When using a mouse click, the desired row is selected. However, when using the Tab Key (or arrow keys), the row is not selected.  I have tried finding the proper event that has a rowindex type argument to use to select the current row, but have failed so far.

    Note:  This is for a grid in Batch Edit mode, so I need to do this solely on the Client side.

    Thanks in advance,

    g.

  2. Answer
    Eyup
    Admin
    Eyup avatar
    3731 posts

    Posted 14 Dec 2016 Link to this post

    Hi Jeff,

    You can use the following approach to achieve this requirement:
    <ClientEvents OnBatchEditOpened="batchEditOpened" />
    JavaScript:
    function batchEditOpened(sender, args) {
        var row = args.get_row();
        if (!row.control.get_selected()) {
            args.get_tableView().selectItem(row);
        }
    }

    That should do the trick. In addition, I am also attaching a sample RadGrid web site sample.


    Regards,
    Eyup
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Jeff
    Jeff avatar
    10 posts
    Member since:
    Mar 2013

    Posted 15 Dec 2016 in reply to Eyup Link to this post

    Hello Eyup,

    This did work.  Thanks!  

    g.

     

Back to Top