public override void BreakLinksToControl(bool unwireEventsOnly) { if (_searchDropDownEdit != null) { _searchDropDownEdit.DropDown.SelectedIndexChanged -= dropDownLookup_SelectedIndexChanged; _searchDropDownEdit.Init -= dropDownLookup_Init; _searchDropDownEdit.PreRender -= dropDownLookup_PreRender; _searchDropDownEdit.Callback -= result_Callback; } if (!unwireEventsOnly) { _searchDropDownEdit = null; } base.BreakLinksToControl(unwireEventsOnly); }
ASPxSearchDropDownEdit CreateSearchDropDownEditControl() { var result = new ASPxSearchDropDownEdit(_helper, EmptyValue, DisplayFormat) { Width = Unit.Percentage(100) }; result.DropDown.SelectedIndexChanged += dropDownLookup_SelectedIndexChanged; result.Init += dropDownLookup_Init; result.PreRender += dropDownLookup_PreRender; result.Callback += result_Callback; result.ReadOnly = !AllowEdit; UpdateDropDownLookup(result); return(result); }
protected override WebControl CreateEditModeControlCore() { if (_newObjectWindowAction == null) { _newObjectWindowAction = new PopupWindowShowAction(null, "New", PredefinedCategory.Unspecified.ToString()); _newObjectWindowAction.Execute += newObjectWindowAction_OnExecute; _newObjectWindowAction.CustomizePopupWindowParams += newObjectWindowAction_OnCustomizePopupWindowParams; _newObjectWindowAction.Application = _helper.Application; } var panel = new Panel(); // Use Panel instead of ASPxPanel cause it doesn't affect editor ClientID _searchDropDownEdit = CreateSearchDropDownEditControl(); panel.Controls.Add(_searchDropDownEdit); return(panel); }
void UpdateDropDownLookupControlAddButton(ASPxSearchDropDownEdit control) { control.AddingEnabled = false; if (CurrentObject != null) { string diagnosticInfo; RecreateListView(true); control.AddingEnabled = AllowEdit && DataManipulationRight.CanCreate(_listView, _helper.LookupObjectType, _listView.CollectionSource, out diagnosticInfo); if (control.AddingEnabled) { if (_newObjectViewController != null) { control.AddingEnabled = _newObjectViewController.NewObjectAction.Active && _newObjectViewController.NewObjectAction.Enabled; } } } }
public override void BreakLinksToControl(bool unwireEventsOnly) { if (searchDropDownEdit != null) { searchDropDownEdit.DropDown.SelectedIndexChanged -= dropDownLookup_SelectedIndexChanged; searchDropDownEdit.Init -= dropDownLookup_Init; searchDropDownEdit.PreRender -= dropDownLookup_PreRender; searchDropDownEdit.Callback -= result_Callback; } if (!unwireEventsOnly) { searchDropDownEdit = null; } base.BreakLinksToControl(unwireEventsOnly); }
protected override WebControl CreateEditModeControlCore() { if (newObjectWindowAction == null) { newObjectWindowAction = new PopupWindowShowAction(null, "New", PredefinedCategory.Unspecified.ToString()); newObjectWindowAction.Execute += newObjectWindowAction_OnExecute; newObjectWindowAction.CustomizePopupWindowParams += newObjectWindowAction_OnCustomizePopupWindowParams; newObjectWindowAction.Application = helper.Application; } var panel = new Panel(); // Use Panel instead of ASPxPanel cause it doesn't affect editor ClientID searchDropDownEdit = CreateSearchDropDownEditControl(); panel.Controls.Add(searchDropDownEdit); return panel; }
ASPxSearchDropDownEdit CreateSearchDropDownEditControl() { var result = new ASPxSearchDropDownEdit(helper, EmptyValue, DisplayFormat) { Width = Unit.Percentage(100) }; result.DropDown.SelectedIndexChanged += dropDownLookup_SelectedIndexChanged; result.Init += dropDownLookup_Init; result.PreRender += dropDownLookup_PreRender; result.Callback += result_Callback; result.ReadOnly = !AllowEdit; UpdateDropDownLookup(result); return result; }
void UpdateDropDownLookupControlAddButton(ASPxSearchDropDownEdit control) { control.AddingEnabled = false; if (CurrentObject != null) { string diagnosticInfo; RecreateListView(true); control.AddingEnabled = AllowEdit && DataManipulationRight.CanCreate(listView, helper.LookupObjectType, listView.CollectionSource, out diagnosticInfo); if (control.AddingEnabled) { if (newObjectViewController != null) { control.AddingEnabled = newObjectViewController.NewObjectAction.Active && newObjectViewController.NewObjectAction.Enabled; } } } }