System.Data.DataRowView.EndEdit C# (CSharp) Метод

EndEdit() публичный Метод

public EndEdit ( ) : void
Результат void
        public void EndEdit()
        {
            if (IsNew)
            {
                _dataView.FinishAddNew(true);
            }
            else
            {
                Row.EndEdit();
            }
            _delayBeginEdit = false;
        }

Usage Example

Пример #1
0
        private void mapControlToCommandGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            var Cell = mapControlToCommandGrid.Rows[e.RowIndex].Cells[e.ColumnIndex];
            var Row  = Cell.OwningRow;
            var Col  = Cell.OwningColumn;

            if (Col.IsDataBound && Col.Name == "CatCmdIdColumn")
            {
                if (mapControlToCommandGrid.CurrentCell.EditType == typeof(DataGridViewComboBoxEditingControl))
                {
                    DataGridViewComboBoxCell cb = (DataGridViewComboBoxCell)mapControlToCommandGrid[e.ColumnIndex, e.RowIndex];
                    cb.DataSource = catCmdsBindingSource;
                }
            }
            else if (Col.IsDataBound && Col.Name == "midiControlTypeColumn")
            {
                ControlType ctrlType    = (ControlType)Row.Cells["midiControlTypeColumn"].Value;
                CatCmd      CatCmdValue = (CatCmd)Row.Cells["CatCmdIdColumn"].Value;
                var         attr        = CatCmdDb.Get(CatCmdValue);
                if (attr.ControlType != ctrlType)
                {
                    System.Data.DataRowView obj = (System.Data.DataRowView)mapControlToCommandGrid.CurrentRow.DataBoundItem;
                    obj.BeginEdit();
                    obj.Row["CatCmdId"] = 0;
                    obj.EndEdit();
                }
            }
        }
All Usage Examples Of System.Data.DataRowView::EndEdit