Is there a way to keep a specific EditCommandColumn from firing?

N

needin4mation

Hi, I have code that hides the EditCommandColumn in some places where I
do not want the user to be able to edit that row. However, to do it, I
change the visible property to false. What I would like to do is put
some text in there that says "n/a" or something like that. I cannot do
it at the moment because I changed the visible property of the button
to be, of course false. Is there a way to put it in the cell itself or
have it so that I can cause a certain button not to fire the edit event
on that particular record?

So you know. Everything works. I can reference the control just fine.
I am only trying to find an alternative to myButton.Visible=false. I
just don't want it to fire.

Thank you for any help.
 
N

needin4mation

Sorry, answered my own question. I just added this:

myButton.Attributes.Add("onclick","return false");
myChangeButton.Attributes.Add("onclick","return false");
myChangeButton.Text="n/a";
myButton.Text="n/a";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top