Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

GridView Hide Update Link

Posted on 2006-07-20
6
Medium Priority
?
926 Views
Last Modified: 2008-01-09
I am handling the updating of my gridview using a button below the gridview.

I want to be able to hide the update link when you are editing a record, but keep the cancel link.

any ideas ??
0
Comment
Question by:mpdalton
[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
  • 2
6 Comments
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 17151764
Just set the Visible Property of the Button to False
on the Row_Editing event of the Grid
and show it back again on Cnacel or Update event
0
 
LVL 3

Author Comment

by:mpdalton
ID: 17164230
this is a link, not a button. i can see all of the controls and access them using their name, but cannot see the update and cancel links by id.

when i look at the source they don't seem to have names that i can refer to.

any ideas ?
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 2000 total points
ID: 17165370
Oh OK I got your point....You want to hide the Normal "Update" link that the Grid shows in each column when you edit the Row, because you would handle the Update from a separate button. Is it ?

Then try this...

On the Row_Created event of the Grid write this
       
        If (e.Row.RowState And DataControlRowState.Edit) Then
            e.Row.Cells(0).Controls.RemoveAt(0)
        End If

This assumes that the first row is where the "Update" and "Cancel" buttons in the same order
(otherwise you  might need to change the index in the code above)
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 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