public override void applyRetrievingAttribute(IDataBindingSource src, FieldRetrievingEventArgs e) { if (_elementType == DynamicFormActionElementType.Action) { src.EditorsHost.FormSupport.RegisterAction(new DynamicFormAction(_action, e.FieldName, _param, null, src)); } else { src.EditorsHost.FormSupport.RegisterActionTrigger(new DynamicFormActionTrigger(_action, e.FieldName, _param, null, src)); } }
public override void applyRetrievingAttribute(IDataBindingSource src, FieldRetrievingEventArgs e) { e.EditorType = typeof(CustomAnyControlEdit); //typeof(UserControlEditor);//typeof(AnyControlEdit);//typeof(UserControlEditor); }
public override void applyRetrievingAttribute(IDataBindingSource src, FieldRetrievingEventArgs e) { e.EditorType = typeof(ButtonEdit); }
// data layout like container public override void applyRetrievingAttribute(IDataBindingSource src, FieldRetrievingEventArgs e) { //e.EditorType = typeof(DevExpress.XtraEditors.TextEdit); }
// data layout like container public override void applyRetrievingAttribute(IDataBindingSource src, FieldRetrievingEventArgs e) { e.EditorType = typeof(DevExpress.XtraEditors.LookUpEdit); }
//layout like public virtual void applyRetrievingAttribute(IDataBindingSource scr, FieldRetrievingEventArgs e) { }
private void FieldRetrievingHandler(object sender, FieldRetrievingEventArgs e) { #if DEBUG Stopwatch sw = new Stopwatch(); sw.Start(); #endif if (base.Current != null) { IEnumerable<CustomAttribute> attrs = ReflectionHelper.GetCustomAttributesFromPath(base.Current.GetType(), e.FieldName); IList<CustomAttribute> ac = new List<CustomAttribute>(); foreach (CustomAttribute a in attrs) { a.applyRetrievingAttribute(this, e); ac.Add(a as CustomAttribute); } if(ac.Count > 0) _attributesCache[e.FieldName] = ac; } #if DEBUG sw.Stop(); _logger.Debug(String.Format("Elapsed={0}", sw.Elapsed)); #endif // fixed things e.DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged; e.Handled = true; }