/// <include file='doc\DataRow.uex' path='docs/doc[@for="DataRow.BeginEdit"]/*' /> /// <devdoc> /// <para>Begins an edit operation on a <see cref='System.Data.DataRow'/>object.</para> /// </devdoc> public void BeginEdit() { if (inChangingEvent) { throw ExceptionBuilder.BeginEditInRowChanging(); } if (tempRecord != -1) { return; } if (oldRecord != -1 && newRecord == -1) { throw ExceptionBuilder.DeletedRowInaccessible(); } tempRecord = Table.NewRecord(newRecord); }
private bool BeginEditInternal() { if (this.inChangingEvent) { throw ExceptionBuilder.BeginEditInRowChanging(); } if (this.tempRecord != -1) { if (this.tempRecord < this._table.recordManager.LastFreeRecord) { return(false); } this.tempRecord = -1; } if ((this.oldRecord != -1) && (this.newRecord == -1)) { throw ExceptionBuilder.DeletedRowInaccessible(); } this.ResetLastChangedColumn(); this.tempRecord = this._table.NewRecord(this.newRecord); return(true); }