DevExpress - ASPxGridView - Confirm Delete on Client

Here is a snippet of code to confirm delete on the client using DevExpress ASPxGridView.

Example Message - Command Button in Grid: 

 

Inside of the HTMLRowCreated Add the following:  The code below will pull values from the ASPxGridView and add these to message inside of the button's ClientSideScriptEvent handler.

//Get Values from Grid
ASPxGridView grid = (ASPxGridView)sender;
object[] rowValues = (object[])grid.GetRowValues(e.VisibleIndex, 
   new string[] { "StockSymbol", "ExpirationDate", "CompanyName", "OptionType", "Strike" });
string StockSymbol = Convert.ToString(rowValues[0]);
DateTime ExpirationDate = Convert.ToDateTime(rowValues[1]);
string CompName = Convert.ToString(rowValues[2]);
string OptionType = Convert.ToString(rowValues[3]);
string Strike = Convert.ToString(rowValues[4]);

//.... other code....

//Set the button message        
BtnWatchlist.ImageUrl = "~/Controls/Images/icon_minus.png";
BtnWatchlist.ToolTip = "Remove From Watchlist";

//Set JavaScript
string JavaScript = "function(s, e){ e.processOnServer = confirm('$$MSG'); }";

//Set client message
string WatchlistMsg = @"Are you sure you want to remove? \n\n"
+ "Option: " + StockSymbol
+ " - " + OptionType
+ " - " + ExpirationDate.ToShortDateString()
+ " - Strike: " + Strike;

JavaScript = JavaScript.Replace("$$MSG", WatchlistMsg);
//Add event
BtnWatchlist.ClientSideEvents.Click = JavaScript;

Bootstrap and jQuery Tabs

Tab control using Bootstrap. Demo purposes as I work out something for a project. Enjoy some great photos of Pictured Rocks National Lakeshore in Michigan! 

Bootstrap Tab Sample

Bootstrap_tabs.html (2.2KB)
Unlike any other place on Lake Superior, Pictured Rocks offers the opportunity to explore miles of pristine beaches, hike over 100 miles of trails, and experience the serenity of the northern hardwood forest. 

In the spring, a new world appears along trails carpeted with the soft beauty of wildflowers. Summer gives way to warm basking days. Blinking lights of orange, red, and yellow signal the wonder of change in autumn. In the winter, the raw windy beauty of snow frequents the days though periodically the snow blazes forth with sunlight.

Click Here to visit the National Parks Service

jQuery Tab Sample

jQueryTabs.html (3KB)