0
進出口試圖使Excel,PDF和打印按鈕,我的數據表結果, 好,我做到了,但是,當我重新加載數據表的Excel和打印按鈕disapear的內容,數據表按鈕Disapear後刷新
這是我如何發送信息到DataTable
$.ajax({
type: 'POST',
url: 'Inicio.aspx/ContactsList',
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
FillDataTable(data, 'Listado de Todos');
}
});
這裏的Methot我的DataTable
function FillDataTable(data, reporte) {
$('#GridActivos').dataTable({
dom: 'Bfrtip',
destroy: true,
buttons: [
{
extend: 'excel',
customize: function (xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r*="10"]', sheet).attr('s', '25');
},
title: reporte
},
{
extend: 'pdf',
title: reporte
},
{
extend: 'print',
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.prepend(
'<img src="http://datatables.net/media/images/logo-fade.png" style="position:absolute; top:0; left:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
},
title: reporte
},
],
select: {
style: 'single'
},
bProcessing: true,
"aaData": JSON.parse(data.d),
"aoColumns": [
{ "mDataProp": "ID" },
{ "mDataProp": "NOMBRES" },
{ "mDataProp": "Sexo" },
{ "mDataProp": "Edad" },
{ "mDataProp": "Puntuacion" },
{ "mDataProp": "NivelEconomico" },
{ "mDataProp": "Hacinamiento" },
{ "mDataProp": "RelM" },
{ "mDataProp": "RelP" },
{ "mDataProp": "RelT" }
]
});
}
這裏是圖像當y預SS通過第一次 Imagen1
這裏的搜索按鈕是,當我再次按下 Imagen2