public FilterOptionsControl(core.db.fo.FilterOptions fo) { _LayoutAssetPath = SPersistenceManager.GetDefaultAssetsPath(SPersistenceManager.AssetKind.Layout, GetType()); _fo = fo; _formSupport = new FormSupport(); // editing form will not highlight edited field _formSupport.HighlightEditedField = false; InitializeComponent(); simpleButtonOk.Click += SimpleButtonOk_Click; _formBindingSource = new xwcs.core.db.binding.DataLayoutBindingSource(this); _formBindingSource.LayoutContainer = mainContainer; _formBindingSource.DataSource = _fo; _formBindingSource.LayoutBaseFileName = "FilterOptions"; //dxErrorProvider.DataSource = _formBindingSource; UpdateLayout(); }
public EntityEditControl(ModelType model) { _LayoutAssetPath = SPersistenceManager.GetDefaultAssetsPath(SPersistenceManager.AssetKind.Layout, GetType()); _model = model; _formSupport = new FormSupport(this); // editing form will not highlight edited field _formSupport.HighlightEditedField = false; InitializeComponent(); simpleButtonCancel.CausesValidation = false; simpleButtonCancel.AllowFocus = false; simpleButtonOk.AllowFocus = false; simpleButtonOk.Click += SimpleButtonOk_Click; simpleButtonCancel.Click += SimpleButtonCancel_Click; _formBindingSource = new xwcs.core.db.binding.DataLayoutBindingSource(this); _formBindingSource.LayoutContainer = mainContainer; _formBindingSource.DataSource = _model; _formBindingSource.LayoutBaseFileName = string.Format("EditControl_{0}", _model.GetType().Name); //dxErrorProvider.DataSource = _formBindingSource; UpdateLayout(); }