Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

How to hide button in GridView?

$
0
0

Hello all!

Simple question as always, but i can't find question.

I need to hide some Button, but it doesn't work.

ASPX:

<asp:ButtonField buttontype="Button" commandname="AddCustomValue" headertext="" Text="ButtonText" />

ASPX.CS:

foreach (GridViewRow gr in gvQuota.Rows)
           {

               Button buttonFromGV= (Button )gr.FindControl("TextCustomValue");
               buttonFromGV.Visible = false;
           }

What i'm doing wrong?

Thanks a lot!


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>