Following link is working code jsfiddle sample authored (I believe) by one of Kendo own developers
I took the sample in it's entirety and copied it into VS2013 test project.
When I run it: grid shows up correctly, exactly like in jsfiddle sample, when I select grid row event "on change" is firing correctly as well.
But in "change" event in my version variable id is "undefined"!
I can't figure out what's wrong and will appreciate any help or advise. Thanks!
change: function () {
var row = this.select(); // this variable is (context: undefined, length: 1, selector:">tbody>tr.k-state-selected, "
var id = row.data("id"); // id is undefined in my copy but works in jsfiddle!
$("#log").html("selected row with id= " + id + " , for ShipName = " + dataSource.get(id).get("ShipName"));
}
My<script> and <style> tags:
link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<link href="./js/kendopro/styles/kendo.common.min.css" rel="stylesheet" />
<link href="./js/kendopro/styles/kendo.default.min.css" rel="stylesheet" />
<link href="./js/kendopro/styles/kendo.silver.min.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<script src="./js/kendopro/js/kendo.all.min.js"></script>