I call this function that returns me a list and populates a table in the view, updating every time I pass a parameter through the filter. Everything works perfectly, I just need to put paging because it has search that returns more than 100 lines. I researched a lot, but I did not hit the pluggins. I really wanted to just implement what has already been done.
function CarregaGridCliente(representante, vendedor) {
$("#tbl > tbody").empty();
$.ajax({
type: "GET",
url: "/Representantes/Clientes/Listar",
mtype: 'GET',
async: false,
datatype: 'json',
data: { representante: representante, vendedor: vendedor },
success: function (data) {
$.each(data, function (i, element) {
$("#tbl > tbody").append(
"<tr>" +
" <td>" + element.A1_COD + "</td>" +
" <td>" + element.A1_LOJA + "</td>" +
" <td>" + element.A1_NOME + "</td>" +
" <td>" + element.A1_CGC + "</td>" +
" <td>" + element.A1_MUN + "</td>" +
" <td>" + element.A1_TEL + "</td>" +
"</tr>"
);
});
}
});
}