示例#1
0
        /// <include file='doc\DataRow.uex' path='docs/doc[@for="DataRow.EndEdit"]/*' />
        /// <devdoc>
        ///    <para>Ends the edit occurring on the row.</para>
        /// </devdoc>
        public void EndEdit()
        {
            if (inChangingEvent)
            {
                throw ExceptionBuilder.EndEditInRowChanging();
            }

            if (newRecord == -1)
            {
                return; // this is meaningless.
            }

            if (tempRecord != -1)
            {
                //int record = tempRecord;
                //tempRecord = -1;
                SetNewRecord(tempRecord);
            }
        }
示例#2
0
 public void EndEdit()
 {
     if (this.inChangingEvent)
     {
         throw ExceptionBuilder.EndEditInRowChanging();
     }
     if ((this.newRecord != -1) && (this.tempRecord != -1))
     {
         try
         {
             bool suppressEnsurePropertyChanged = true;
             this._table.SetNewRecord(this, this.tempRecord, DataRowAction.Change, false, true, suppressEnsurePropertyChanged);
         }
         finally
         {
             this.ResetLastChangedColumn();
         }
     }
 }