Display number of records in a page And oTableTools property together
Display number of records in a page And oTableTools property together
vam
Posts: 5Questions: 0Answers: 0
Hi,
I want to select drop-down for no of record per page and export option in same page.
but am unable to do it both together.
either one of them option work at a time.
My table configuration as given below
[code]
tableObj= [];
tableObj.aaData = data.msg.aaData;
tableObj.aoColumns = aoColumns;
tableObj.bProcessing = true;
tableObj.sScrollX = "100%";
tableObj.bDestroy = true;
tableObj.bStateSave = true;
tableObj.sDom = '<"H"Tfr>t<"F"ip>';
tableObj.oTableTools = [];
tableObj.oTableTools.aButtons = ["copy", "csv", "xls", "print"];
tableObj.oTableTools.sSwfPath = "/js/copy_csv_xls.swf";
tableObj.bLengthChange = true;
tableObj.aLengthMenu = [[10, 25, 50, -1], [10, 25, 50, "All"]];
tableObj.iDisplayLength = 10;
tableObj.fnStateLoad = function (oSettings) {
return false;
};
$('#biReportTable').dataTable(tableObj);
[/code]
Kindly help me to resolve the same.
Thanks in advance
I want to select drop-down for no of record per page and export option in same page.
but am unable to do it both together.
either one of them option work at a time.
My table configuration as given below
[code]
tableObj= [];
tableObj.aaData = data.msg.aaData;
tableObj.aoColumns = aoColumns;
tableObj.bProcessing = true;
tableObj.sScrollX = "100%";
tableObj.bDestroy = true;
tableObj.bStateSave = true;
tableObj.sDom = '<"H"Tfr>t<"F"ip>';
tableObj.oTableTools = [];
tableObj.oTableTools.aButtons = ["copy", "csv", "xls", "print"];
tableObj.oTableTools.sSwfPath = "/js/copy_csv_xls.swf";
tableObj.bLengthChange = true;
tableObj.aLengthMenu = [[10, 25, 50, -1], [10, 25, 50, "All"]];
tableObj.iDisplayLength = 10;
tableObj.fnStateLoad = function (oSettings) {
return false;
};
$('#biReportTable').dataTable(tableObj);
[/code]
Kindly help me to resolve the same.
Thanks in advance
This discussion has been closed.
Replies
However, I think the problem you are having here is the your sDom doesn't have the length menu option in it (i.e. `l` ). Just add the letter `l` into your sDom, where you want it to appear in the DOM structure, and it will be there.
Allan
Thanks Its working.
I had change Sdom property to Tlfrtip and its start working.
Thanks once again.