Inside the type displayed in the DataGrid . This was necessary, because when I use tabs, and the DataGrid is stored on this tab, the tabs necessary for forcing to speak within the DataGrid switch if the cell was active; discarding changes because they were not committed. T
To achieve this function, DataGrid behavior is applied, but part of IEditableObject is below.
private IDatabaseConnection _copy; void IEditableObject.BeginEdit() { if (this._copy == null) this._copy = _container.Resolve<IDatabaseConnection>(); _copy.Database = this.Database; _copy.DisplayName = this.DisplayName; _copy.HostName = this.HostName; _copy.Username = this.Username; _copy.Password = this.Password; } void IEditableObject.CancelEdit() { this.Database = _copy.Database; this.DisplayName = _copy.DisplayName; this.HostName = _copy.HostName; this.Username = _copy.Username; this.Password = _copy.Password; } void IEditableObject.EndEdit() { _copy.Database = String.Empty; _copy.DisplayName = String.Empty; _copy.HostName = String.Empty; _copy.Username = String.Empty; _copy.Password = String.Empty; }
Aaron mciver
source share