protected void ListView1_ItemUpdated(object sender, ListViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         Response.Write("<script type='text/javascript'> alert('" + e.Exception.Message + "')) </script>");
     }
 }
Example #2
0
 protected void lvScreen_ItemUpdated(object sender, ListViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblError.Text = "A database error has occurred. " + e.Exception.Message;
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
 }
 protected void _listView_ItemUpdated(object sender, ListViewUpdatedEventArgs e)
 {
 }
Example #4
0
		protected override void OnItemUpdated (ListViewUpdatedEventArgs e)
		{
			RecordEvent ("Enter");
			base.OnItemUpdated (e);
			RecordEvent ("Leave");
		}
Example #5
0
 protected virtual void OnItemUpdated(ListViewUpdatedEventArgs e) {
     EventHandler<ListViewUpdatedEventArgs> handler = (EventHandler<ListViewUpdatedEventArgs>)Events[EventItemUpdated];
     if (handler != null) handler(this, e);
 }
Example #6
0
        private bool HandleUpdateCallback(int affectedRows, Exception ex) {
            ListViewUpdatedEventArgs e = new ListViewUpdatedEventArgs(affectedRows, ex);
            e.SetKeys(_updateKeys);
            e.SetOldValues(_updateOldValues);
            e.SetNewValues(_updateNewValues);

            OnItemUpdated(e);
            _updateKeys = null;
            _updateOldValues = null;
            _updateNewValues = null;
            if (ex != null && !e.ExceptionHandled) {
                // If there is no validator in the validation group that could make sense
                // of the error, return false to proceed with standard exception handling.
                // But if there is one, we want to let it display its error instead of throwing.
                if (PageIsValidAfterModelException()) {
                    return false;
                }
                e.KeepInEditMode = true;
            }

            if (IsUsingModelBinders && !Page.ModelState.IsValid) {
                e.KeepInEditMode = true;
            }

            // We need to databind here event if no records were affected because
            // changing the EditIndex required a rebind.  The event args give the programmer
            // the chance to cancel the bind so the edits aren't lost.
            if (!e.KeepInEditMode) {
                EditIndex = -1;
                RequiresDataBinding = true;
            }
            return true;
        }
 protected void ListViewTaskDetails_ItemUpdated(object sender, ListViewUpdatedEventArgs e)
 {
     this.GridViewTask.DataBind();
 }
 protected void ListView1_ItemUpdated(object sender, ListViewUpdatedEventArgs e)
 {
     Response.Redirect("~/client/clientaccount.aspx");
 }
 protected void ListView1_ItemUpdated(object sender, ListViewUpdatedEventArgs e)
 {
     ModalPopupExtender1.Show();
 }