Thread View: borland.public.csharpbuilder.aspdotnet.general
1 messages
1 total messages
Started by johnmott
Wed, 12 Sep 2007 15:51
Sample code: Add delete confirmation to a GridView Control.
Author: johnmott
Date: Wed, 12 Sep 2007 15:51
Date: Wed, 12 Sep 2007 15:51
20 lines
2051 bytes
2051 bytes
Hi all, One of the limitations of the GridView control is that the built-in delete processing doesn't prompt for confirmation -- something thats very important for a user interface. True, you can add server side logic for this, but its much more reassuring to have a Javascript confirmation window open up and prompt. There are several techniques for doing this, just google 'Gridview delete confirm' to see them. I've figured out one which does not involve adding logic to the GridView setup, so there are fewer moving parts. And, it still preserves the ViewState. There is a small amount of C# code to perform the actual record delete, but this is mostly a client-side/Javascript technique. The sample application with source is available at App: http://www.nicecleanexample.com/ViewApp.aspx?TID=gridviewconfirmdel Hope it helps. John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads