Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: gridview edit and delete

Thread Tools

Re: gridview edit and delete

Jonathan Wood
Posts: n/a
Convert the column in question into a template and then do something like

<asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="false"
CommandName="Delete" Text="Delete"
OnClientClick="return confirm('Are you sure you want to delete this
record?');" />

Jonathan Wood
SoftCircuits Programming

"J" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) communications...
>I like the Edit (Update, Cancel) functionality built into the gridview, but
>I'd like to control what happens when the Update is clicked. I would like
>to prompt the user with something like this "category has changed from
>'something' to 'something else', shall I process related records?
>(yes/no)". I would also like to confirm when a user clicks Delete.
> Here's how I currently have the gridview configured:
> <asp:GridView ID="gvMyGridView" runat="server" AllowSorting="True"
> AutoGenerateColumns="False" DataKeyNames="BigId" DataSourceID="sdsMonday">
> <Columns>
> <asp:BoundField DataField="Stage" HeaderText="Description"
> SortExpression="Stage" />
> <asp:CommandField ShowEditButton="True" />
> <asp:CommandField ShowDeleteButton="True" />
> </Columns>
> </asp:GridView>
> Thanks.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview with a single insert edit and delete button ASP .Net Web Controls 0 08-01-2008 03:04 PM
GridView control enters edit mode when I click Edit link twice Jaime Stuardo ASP .Net Web Controls 0 04-07-2006 12:47 AM
GridView edit validation, edit dropdown list, delete popup confirm =?Utf-8?B?a2Vu?= ASP .Net 1 01-23-2006 12:51 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 24 05-10-2005 10:15 PM
Snapshot restraint - edit, edit, edit Patrick Digital Photography 0 05-06-2005 10:53 PM