I tried the same thing explained in other thread. But I am not able to bind the json data to Kendo UI grid.
<div id="grid"></div>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="../../Scripts/kendo/kendo.all.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var jData = new kendo.data.DataSource({
transport: {
read: {
url: "/Test/IndexTest",
dataType: "json"
}
},
});
$("#grid").kendoGrid({
dataSource: jData,
columns: [
{
field: "TestDe",
title: "Description"
},
{
field: "Url",
title: "TestStr"
}],
height: 200,
scrollable: true,
pageable: true,
sortable: {
mode: "multiple"
}
});
});
</script>
Json format is {"TestDe":null,"TestList":[],"Url":"dsgyuddufgufh"}
Code behind Controller
public JsonResult IndexTest()
{
TestTableSql t = new TestTableSql();
var a=t.GetTestTableList();
return Json(a, JsonRequestBehavior.AllowGet);
}
<div id="grid"></div>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="../../Scripts/kendo/kendo.all.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var jData = new kendo.data.DataSource({
transport: {
read: {
url: "/Test/IndexTest",
dataType: "json"
}
},
});
$("#grid").kendoGrid({
dataSource: jData,
columns: [
{
field: "TestDe",
title: "Description"
},
{
field: "Url",
title: "TestStr"
}],
height: 200,
scrollable: true,
pageable: true,
sortable: {
mode: "multiple"
}
});
});
</script>
Json format is {"TestDe":null,"TestList":[],"Url":"dsgyuddufgufh"}
Code behind Controller
public JsonResult IndexTest()
{
TestTableSql t = new TestTableSql();
var a=t.GetTestTableList();
return Json(a, JsonRequestBehavior.AllowGet);
}