private void ConfigureClientSideEvents(ASPxComboBox comboBox) { var displayText = _helper.GetDisplayText(PropertyValue, NullText, DisplayFormat); var objectKey = _helper.GetObjectKey(PropertyValue); comboBox.ClientSideEvents.Init = $"function(s,e){{EditorInit(s,'{_helper.LookupListViewModel.Id}','{_parentView.Id}','{_clientStorage}','{displayText}','{objectKey}');}}"; }
public void SetValueToControl(object obj) { if (_searchDropDownEdit != null) { ASPxComboBox controlBox = _searchDropDownEdit.DropDown; foreach (ListEditItem item in controlBox.Items) { var val = item.Value as string; if (val == _helper.GetObjectKey(obj)) { controlBox.SelectedIndex = item.Index; break; } } } }
public void SetValueToControl(object obj) { DevExpress.Web.ASPxComboBox Control = null; if (searchDropDownEdit != null) { Control = searchDropDownEdit.DropDown; } foreach (DevExpress.Web.ListEditItem item in Control.Items) { string val = item.Value as string; if (val == helper.GetObjectKey(obj)) { Control.SelectedIndex = item.Index; break; } } }
private void newObjectWindowAction_OnExecute(Object sender, PopupWindowShowActionExecuteEventArgs args) { if (objectSpace != args.PopupWindow.View.ObjectSpace) { args.PopupWindow.View.ObjectSpace.CommitChanges(); } //AddObjectToDataSource(helper.ObjectSpace.GetObject(((DetailView)args.PopupWindow.View).CurrentObject)); ((PopupWindow)args.PopupWindow).ClosureScript = "if(window.opener != null) window.dialogOpener.ddLookupResult = '" + helper.GetObjectKey(((DetailView)args.PopupWindow.View).CurrentObject) + "';"; }