I am using ajax options with a target Id on a table. Now I need to add Pagination to the table See the code below.
I need to add pagination so when the target.append renders, it renders with pagination.
select: function (event, ui) {
$.ajax({
cache: false,
async: false,
type: "GET",
url: "@(Url.Action("Test", "TesPage"))",
dataType: 'json',
data: { "id": ui.item.Id },
success: function (data) {
$("#ID").val(ui.item.Id);
var target = $("#Load");
target.empty();
for (var i = 0; i < data.length; i++) {
var item = data[i];
target.append("<tr><td>" + item.Id + "</td><td>"
+ item.Number + "</td><td>" + item.Name + "</td><td>"
+ item.Partsmoved + "</td><td>" + item.PartsSerial + "</td></tr>");
}
},
error: function (xhr, thrownError) {
}
});