protected void Page_Load(object sender, EventArgs e) { if (Session["CarId"] != null) { ASPxGridViewDetailPerformCallback.DataSource = SqlDSDetailCB; ASPxGridViewDetailPerformCallback.DataBind(); } if (!ClientScript.IsStartupScriptRegistered("home")) { string script = @"Home = function () { this.confirmText = 'Save data?'; } Home.prototype = { Confirm: function(s, e) { if (!confirm(this.confirmText)) { e.processOnServer = false; }; } } window.home = new Home(); "; Page.ClientScript.RegisterStartupScript(this.GetType(), "home", script, true); } }
protected void ASPxGridViewDetailPerformCallback_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { object masterKeyValue = ASPxGridViewMasterPerformCallback.GetRowValues(Convert.ToInt32(e.Parameters), "Id"); Session["CarId"] = masterKeyValue; ASPxGridViewDetailPerformCallback.DataSource = SqlDSDetailCB; ASPxGridViewDetailPerformCallback.DataBind(); }