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

[Solved] Grid Selected Row

3 Answers 174 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 16 Dec 2014, 11:20 PM
The following code has been used to get the selected row in the Kendo Grid, using kendo.all.min.js version 2014.1.328.

var gview = $("#grid").data("kendoGrid");
var row = gview.dataItem(gview.select());

The code no longer works with kendo.all.min.js version 2014.3.111.9.  The .select() function no longer exists.  

Is this a bug or done on purpose? If so what's the best way to do this now?

3 Answers, 1 is accepted

Sort by
0
Bill
Top achievements
Rank 1
answered on 17 Dec 2014, 12:18 AM
The following property is set...

Selectable: true
0
Bill
Top achievements
Rank 1
answered on 17 Dec 2014, 01:48 AM
Following up:  Here's the javascript for the old version as well as the new version.  The new version has additional code of column locks?

Version 2014.1.328: 
prototype, select: function (i){var u=this,r=u.selectable;
return i=n(i),i.length?(r.options.multiple||(r.clear(),i=i.first()),r.value(i),t):r.value()}

Version 2014.3.111.9
function (i){var u=this,r=u.selectable;
return i=n(i),i.length?(r.options.multiple||(r.clear(),i=i.first()),
u._isLocked()&&(i=i.add(i.map(function(){return u._relatedRow(this)}))),r.value(i),t):r.value()}
0
Dimiter Madjarov
Telerik team
answered on 17 Dec 2014, 09:28 AM
Hello Bill,


The select method still exists in the Grid API. If the issue is still persisting, please send us an isolated runnable example that demonstrates it so we could provide further assistance.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Bill
Top achievements
Rank 1
Answers by
Bill
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or