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

Selecting row with Tab Key navigation (without postback)

2 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 09 Dec 2016, 02:17 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 14 Dec 2016, 12:50 PM
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.
0
Jeff
Top achievements
Rank 1
answered on 15 Dec 2016, 08:40 PM

Hello Eyup,

This did work.  Thanks!  

g.

 

Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or