Click here to Skip to main content
15,997,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a grid view and a button(button for printing). once i click the print button i want to hide the allow paging in the gridview in asp.net
Posted

set allow paging to false just before printing the content and set allow paging to true in the Page_Load, as the page will load after each PostBack.

just check out and try in the following way:
http://www.dotnetspider.com/forum/299073-How-Hide-gridview-Allow-paging-While-taking-printout.aspx[^]
 
Share this answer
 
AllowPaging =false Does not work, i have changed this code the following is working properly
C#
protected void Page_Load(object sender, EventArgs e)
    {
        GridView1.BottomPagerRow.Visible = true;
    }
protected void Button1_Click(object sender, EventArgs e)
    {
        GridView1.BottomPagerRow.Visible = false;       
    }
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900