Solved

How do identify buttoncolumn?

Posted on 2013-06-03
1
283 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 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now