I am working on VS 2010 MVC4, HTML 5 with kendo ui demo version
I tried to bind a grid, corresponding to the data entered in a textbox, but the grid is not getting populated
Also there is no error displayed and if i put a dummy data in datasource it displays
This is the code i used
$("#txtSearchCaller").keyup(function () { SearchCaller($(this)); });
function SearchCaller(txtSearchCaller) {
SearchRequestProcess = $.ajax({
type: "GET",
url: baseURL + "Call/SearchCaller",
data: "term=" + $(txtSearchCaller).val(),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnGetCallerSuccess,
error: function (request, status, error) { if (request.statusText != "abort") { alert("SearchCaller:: " + request.statusText); } }
});
}
}
function OnGetCallerSuccess(Jsondata, status) {
$("#Grid").kendoGrid({ // create Grid from div HTML element Kendo
dataSource: Jsondata,
selectable: "row",
scrollable: true,
navigatable: true,
resizable: true,
groupable: false,
columns: [
{
field: "category1",
title: "category1",
width: 80
},
{
field: "category2",
title: "Customer Name",
width: 80
},
]
});
}
I tried to bind a grid, corresponding to the data entered in a textbox, but the grid is not getting populated
Also there is no error displayed and if i put a dummy data in datasource it displays
This is the code i used
$("#txtSearchCaller").keyup(function () { SearchCaller($(this)); });
function SearchCaller(txtSearchCaller) {
SearchRequestProcess = $.ajax({
type: "GET",
url: baseURL + "Call/SearchCaller",
data: "term=" + $(txtSearchCaller).val(),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnGetCallerSuccess,
error: function (request, status, error) { if (request.statusText != "abort") { alert("SearchCaller:: " + request.statusText); } }
});
}
}
function OnGetCallerSuccess(Jsondata, status) {
$("#Grid").kendoGrid({ // create Grid from div HTML element Kendo
dataSource: Jsondata,
selectable: "row",
scrollable: true,
navigatable: true,
resizable: true,
groupable: false,
columns: [
{
field: "category1",
title: "category1",
width: 80
},
{
field: "category2",
title: "Customer Name",
width: 80
},
]
});
}