I tried to bind a grid from the corresponding to the data entered in a textbox, but the grid is not populated
Also there is no error displayed
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
},
]
});
}
Also there is no error displayed
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
},
]
});
}