Beispiel #1
0
        public override void OnValueChanged(CellContext sender, EventArgs e)
        {
            // set the entity's property with the new cell value
            _columnBinding.SetCellValue(_entity, sender.Value);

            // validate the change via the data source
            var errors = _dataSource.Validate(_entity, CrudAction.Update);

            if (errors.Any())
            {
                DialogEx.Show(sender.Grid, SystemIconType.Error, "Unable to update", errors.ToParagraphCase(), "OK");
                _dataSource.Refresh(_entity);
            }
            else
            {
                _dataSource.Update(_entity);
            }
            _grid.NotifyEntityUpdated(_entity);
        }
 public object Refresh(object entity)
 {
     return(_adaptee.Refresh((TEntity)entity));
 }