Olá amigos,
Estou utilizando o JQuery Datatable, e gostaria de implamentar o ServerSite consumindo os dados de busca do .net c# mvc.
Alguem já teve a experiencia de implementar o mesmo caso? Se sim como fez para retornar os dados e receber a chamada do JQuery?
Recursos:
Utilização: BootStrap
MVC: 4
ASP.NET C#
JS:
gebo_galery_table = {
init: function () {
$('#dt_gal').each(function () {
var bFilter = true;
if ($(this).hasClass('nofilter')) {
bFilter = false;
}
var columnSort = new Array;
$(this).find('thead tr th').each(function () {
if ($(this).attr('data-bSortable') == 'true') {
columnSort.push({ "bSortable": true });
} else {
columnSort.push({ "bSortable": false });
}
});
$(this).dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "FrmCadDptoAplicacao.cs",
"sDom": "<'row'<'span6'<'dt_actions'>l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"bFilter": bFilter,
"fnDrawCallback": function (oSettings) {
},
"aoColumns": columnSort
});
});
$('.dt_actions').html($('.dt_gal_actions').html());
}
};
ResultList(Console Browser):
http://localhost:1512/FrmCadDpto/FrmCadDptoAplicacao.cs?
sEcho=1&iColumns=8&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&mDataProp_4=4&mDataProp_5=5&mDataProp_6=6&mDataProp_7=7&sSearch=&bRegex=false&sSearch_0=
&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable
_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&sSearch_6=&bRegex_6=false&bSearchable_6=true&sSearch_7=&bRegex_7=false&bSearchable_7=true&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=false&bSo
rtable_1=false&bSortable_2=true&bSortable_3=false&bSortable_4=false&bSortable_5=false&bSortable_6=false&bSortable_7=false&_=1433097002037