function Print() {
var prntData = document.getElementById('Table1');
var mywindow = window.open('', 'printer', 'height=400,width=600');
mywindow.document.write('<html><head><title></title>');
mywindow.document.write('</head><body style="direction:rtl;"><pre>');
mywindow.document.write(prntData.innerHTML);
mywindow.document.write('</body></html>');
mywindow.document.close();
mywindow.print();
}
I still used this code, but the way I loaded the data into the table is differnt. Instead of creating the rows and cells using HtmlGenericControl I just used document.write