Html:
<div id="listView" ></div>
<div id="grid" ></div>
Template:
<script type="text/x-kendo-tmplate" id="template">
<div>
<ul>
<li><a class="list k-link" title="#= title #" id="#= id#" >#= name #</a></li>
</ul>
</div>
</script>
I tried to do this using following code but nothing happens. Only id is read correctly but the request is not made.
$(" .list").live({click:function(){
var id=$(this).attr('id');
$("#grid").kendoGrid({
dataSource: {
transport: {
read: "somefile.php?id="+id,
},
schema: {
data:"data",
model: {
id: "id_pf",
fields:{
first:{},
second:{}
}
}
},
total: function(response) {
return $(response.data).length;
},
pageSize: 10
},
columns: [
{ title: "First", field: "first"},
{ title: "Second", field: "second"},
]
});
}});