Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Sample code: Add delete confirmation to a GridView Control. (http://www.velocityreviews.com/forums/t536762-sample-code-add-delete-confirmation-to-a-gridview-control.html)

johnmott 09-12-2007 03:51 PM

Sample code: Add delete confirmation to a GridView Control.
 
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/View...viewconfirmdel

Hope it helps.

John



All times are GMT. The time now is 10:47 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.