Beispiel #1
0
 protected void OnSubItemEndEditing(SubItemEndEditingEventArgs e)
 {
     if (this.SubItemEndEditing != null)
     {
         this.SubItemEndEditing(this, e);
     }
 }
Beispiel #2
0
        public virtual void EndEditing(bool AcceptChanges)
        {
            if (this._editingControl == null)
            {
                return;
            }
            SubItemEndEditingEventArgs subItemEndEditingEventArg = new SubItemEndEditingEventArgs(this._editItem, this._editSubItem, (AcceptChanges ? this._editingControl.Text : this._editItem.SubItems[this._editSubItem].Text), !AcceptChanges);

            this.OnSubItemEndEditing(subItemEndEditingEventArg);
            if (subItemEndEditingEventArg.RetainEditor)
            {
                this._editingControl.Focus();
                return;
            }
            this._editItem.SubItems[this._editSubItem].Text = subItemEndEditingEventArg.DisplayText;
            this._editingControl.Leave    -= new EventHandler(this._editControl_Leave);
            this._editingControl.KeyPress -= new KeyPressEventHandler(this._editControl_KeyPress);
            this._editingControl.SendToBack();
            this._editingControl.Visible = false;
            this._editingControl         = null;
            this._editItem    = null;
            this._editSubItem = -1;
        }