Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do identify buttoncolumn?

Posted on 2013-06-03
1
Medium Priority
?
294 Views
Last Modified: 2013-06-04
I have a button column like so:
<asp:ButtonColumn CommandName="Cancel" Text="Make Pending"></asp:ButtonColumn>

Open in new window

I wanted to make this visible or not, row by row, based on some critieria, so I added an
<asp:ButtonColumn ID="btnMakePending" CommandName="Cancel" Text="Make Pending"></asp:ButtonColumn>

Open in new window

In C#:
while (enumerator.MoveNext())
{
    int something = enumerator.Current;
    if (something  != 0)
    {
         btnMakePending.Visible = false;    
    }
}

Open in new window

But it turns out the ID is not a property of ButtonColumn.
How do I do this?
0
Comment
Question by:allelopath
1 Comment
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 2000 total points
ID: 39218077
hi
is this buttoncoloum inside a grid?


if yes then you have to loop through your grid and use find control then set the visibility

see this
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.buttoncolumn.text.aspx
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question