Solved

How do identify buttoncolumn?

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display

679 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