Solved

GridView Hide Update Link

Posted on 2006-07-20
6
910 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
  • 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

919 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

21 Experts available now in Live!

Get 1:1 Help Now