How to print the datas in the datatable?????.......
How to print the datas in the datatable?????.......
HI all.
I am trying to print the datas in the datatble ,i dont want to print next prvious pagenumbersfirst and last.How i can do this..
am having the code like, any one can help me , please..
[code]
window.opener.document.getElementById("btnDiv").style.display="none";
var myOldString = window.opener.document.getElementById("Content").innerHTML;
var lowerstr = myOldString.toLowerCase();
var myNewString = lowerstr.replace('show 102550100 entriessearch: ','History".$SurrenderDetails."');
var myNewString1 = myNewString.replace('border="0"','border="1" cellspacing="1" cellpadding="1"');
var myNewString2 = myNewString1.replace('','');
var myNewString3 = myNewString2.replace('firstprevious12nextlast','');
var myNewString4 = myNewString3.replace('previous12nextlast','');
document.write(myNewString4);
window.opener.document.getElementById("btnDiv").style.display="block";
function showBtn()
{
window.opener.document.getElementById("btnDiv").style.display="block";
window.print();
}
[/code]
I am trying to print the datas in the datatble ,i dont want to print next prvious pagenumbersfirst and last.How i can do this..
am having the code like, any one can help me , please..
[code]
window.opener.document.getElementById("btnDiv").style.display="none";
var myOldString = window.opener.document.getElementById("Content").innerHTML;
var lowerstr = myOldString.toLowerCase();
var myNewString = lowerstr.replace('show 102550100 entriessearch: ','History".$SurrenderDetails."');
var myNewString1 = myNewString.replace('border="0"','border="1" cellspacing="1" cellpadding="1"');
var myNewString2 = myNewString1.replace('','');
var myNewString3 = myNewString2.replace('firstprevious12nextlast','');
var myNewString4 = myNewString3.replace('previous12nextlast','');
document.write(myNewString4);
window.opener.document.getElementById("btnDiv").style.display="block";
function showBtn()
{
window.opener.document.getElementById("btnDiv").style.display="block";
window.print();
}
[/code]
This discussion has been closed.
Replies
I dint get wht exactly u want to say....Do u want to print the table without the pagination buttons ?
well I never did this, but the only logic I can think of is -
On Click of the print button run a Jquery function which is used for pagination and disable pagination, and again after print function ends enable it.
U can find jquery for pagination in jquery.js
Do let us know when u get a solution
What am doing is in datatable. While printing, i don want to display the datatable o, i need only the content. Pagination searching should not be there. I hide the search and dropdown for pagination. in the head part. but i cannot do that in the footer pagination..
I avoid the header like this
[code]
window.opener.document.getElementById("btnDiv").style.display="none";
var myOldString = window.opener.document.getElementById("Content").innerHTML;
var lowerstr = myOldString.toLowerCase();
var myNewString = lowerstr.replace('show 102550100 entriessearch: ','');
document.write(myNewString);
[/code]
Chk this out, I just tried this in my datatable and it worked
[code]
document.getElementById("dataGrid_paginate").style.display = 'none';
[/code]
I used this line in a Onclick JS Function
Note - I used Firebug to check Div Id of the pagination buttons.
Hv Fun Coding, Byee
Allan