lengthMenu not working if I render dataTable through ajax?
lengthMenu not working if I render dataTable through ajax?
karanl
Posts: 6Questions: 3Answers: 0
$.ajax({
type: "GET",
url: "/controller/action",
success: function (data) {
debugger
$("#_Grid").empty();
$("#_Grid").html(data);
},
error: function (xhr, ajaxOptions, thrownError) {
modalMessage('Failed to Load _ExpLevelGrid.', "danger");
}
});
the action method returns partial view of datatable
EDIT: update post to use back ticks (```) for code display
This discussion has been closed.
Answers
Are you receiving any alerts or console log errors?
Maybe you can post more of your Javascript code to see exactly how you are using your ajax request with Datatables. Also please post the data returned in the ajax response. This tech note provides the steps to collect this info.
Kevin