Paging still visible in print page of the table c#


Paging still visible in print page of the table c#



I have a table with paging but I would like to print the whole table. I disable it in the code behind, execute the print function and re enable paging. However it seems that the c# code executes quicker then the actual print is executed or the print page is rendered and the table is still visible with paging. Here is the code:


mainGrid.AllowPaging = false;
ClientScript.RegisterStartupScript(this.GetType(), "msg", "printME();");
mainGrid.AllowPaging = true;

//////////////////////////////////////////////////////////////////////////////

function printME() {
window.print();
}



What would be the solution - setting the timer?





The event is triggered by a button so on click is does everything at once and the print page is not rendered correctly... Any solutions?
– whiterabbitj
Jun 29 at 10:20





adding bool value and calling a method did not work either any solutions?
– whiterabbitj
Jun 29 at 10:32









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV