Solved

How do identify buttoncolumn?

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

752 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