Solved

GridView Hide Update Link

Posted on 2006-07-20
6
913 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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