2

I'm using gridview , and a datapager in it , I couldn't find a way to hide the pager. I tried this code :

pager.Visible = (pager.PageSize < pager.TotalRowCount); 

Is there any other way to achieve it ?

Stephane Rolland
  • 38,876
  • 35
  • 121
  • 169
Aravind30790
  • 974
  • 9
  • 22

1 Answers1

1

You can use this code if you add it in the OnDataBound event

protected void GridView1_DataBound(object sender, EventArgs e)
{
     pager.Visible = (pager.PageSize < pager.TotalRowCount); 
}
Vasil Trifonov
  • 1,857
  • 16
  • 21