Solved

GridView Hide Update Link

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

13 Experts available now in Live!

Get 1:1 Help Now