Hi
Nice easy question I hope
I want to make a button visible or not depending if there are any rows in a gridview. I've got the following bit of code in page load but it only works on the second refresh of the screen for some reason. Needs to go in different event maybe?
Nice easy question I hope
I want to make a button visible or not depending if there are any rows in a gridview. I've got the following bit of code in page load but it only works on the second refresh of the screen for some reason. Needs to go in different event maybe?
Code:
if (this.GridView2.Rows.Count > 0)
this.btnPrint.Visible = true;
else
this.btnPrint.Visible = false;