Can i use jQuery templates to render the table?
Can i use jQuery templates to render the table?
MarcoAurelio
Posts: 1Questions: 0Answers: 0
Hi, iam brazilian guy, then iam sorry my english ^^
Iam using the dataTables a lot, and I want a know if i can use jquery templates to render the table using process by server data?
ex:
[code]
oTable = $("#tbl_companyList").dataTable({
"bProcessing": true,
"bServerSide": true,
"bDestroy": true,
"bRetrieve": true,
"sAjaxSource": "../Handlers/handlerDataTables.ashx",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": function (data, textStatus, jqXHR) {
var jsonEmpresa = $.parseJSON(data.d);
$("#companyTemplate").tmpl(jsonEmpresa.listEmpresa).appendTo("#tbl_companyList tbody");
}
});
}
});
[/code]
[code]
Company:${Nome}
National register:${Cnpj}
Address:${Endereco}
Zip code:${Cep}
edit
delete
Company
Tools
[/code]
Great job for the DataTables, its is a awseome plugin ^^
Thanks.
Iam using the dataTables a lot, and I want a know if i can use jquery templates to render the table using process by server data?
ex:
[code]
oTable = $("#tbl_companyList").dataTable({
"bProcessing": true,
"bServerSide": true,
"bDestroy": true,
"bRetrieve": true,
"sAjaxSource": "../Handlers/handlerDataTables.ashx",
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": function (data, textStatus, jqXHR) {
var jsonEmpresa = $.parseJSON(data.d);
$("#companyTemplate").tmpl(jsonEmpresa.listEmpresa).appendTo("#tbl_companyList tbody");
}
});
}
});
[/code]
[code]
Company:${Nome}
National register:${Cnpj}
Address:${Endereco}
Zip code:${Cep}
edit
delete
Company
Tools
[/code]
Great job for the DataTables, its is a awseome plugin ^^
Thanks.
This discussion has been closed.
Replies
Allan