Solved

How do identify buttoncolumn?

Posted on 2013-06-03
1
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 500 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

626 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