Declined
Last Updated: 14 Mar 2014 17:25 by ADMIN
Alexander
Created on: 10 Mar 2014 19:34
Category: Kendo UI for jQuery
Type: Feature Request
1
Limit grid select() to single grid
Currently, the grid select method operates on the whole page which can easily be an issue if there is more than one HTML table.

Eg: $('#myGrid').data('kendoGrid').select('tr') should only select all rows but actually applies the 'k-state-selected' class to all <tr> elements on the page.

In cases such as $('#myGrid').data('kendoGrid').select('tr:eq(0)') may not select a row in your grid at all since it selects the first row anywhere on the.

Since I've already specified my grid by ID, I would expect the chain of functions to respect that.

Two possible workarounds are:
1. 
$('#myGrid').data('kendoGrid').select('#myGrid tr').
2. 
var grid = $("#myGrid").data("kendoGrid");
var row = grid.tbody.find("tr:eq(0)");
grid.select(row);
1 comment
ADMIN
Telerik Admin
Posted on: 14 Mar 2014 17:25
I consulted with our developers and validated this behavior of the select method is by design. 

You'll need to use one of the options you discovered to select specific row(s) in the grid widget.