Current filter:
                                You should refresh the page.
                                  • I need input parameters from my users. I am prepere class
                                      [NonPersistent]
                                        public class Parameters
                                        {
                                            [ImmediatePostData]
                                            public string FullName { get; set; }
                                            public int Age { get; set; }
                                        }

                                    For shown i am write controller text
                                     public class NoteParamsController : ObjectViewController<ListView, Note>
                                        {
                                            public readonly PopupWindowShowAction showParams;

                                            public NoteParamsController()
                                            {
                                                showParams = new PopupWindowShowAction(this, "ShowParams", PredefinedCategory.View);
                                                showParams.CustomizePopupWindowParams += ShowParams_CustomizePopupWindowParams;
                                            }

                                            private void ShowParams_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e)
                                            {
                                               DetailView detailView = Application.CreateDetailView(ObjectSpace.CreateNestedObjectSpace(), new Parameters());
                                                detailView.ViewEditMode = ViewEditMode.Edit;
                                               e.View = detailView;
                                            }
                                        }

                                    After show DetailView in acion i am wait cursor posution in FullName editor because he is first editor on page. But in fact focus showing 2-3 sec after this focus missing. Need to set focus before inpu value. Possible is it BUG ?

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Pavel,

                                You can specify the item that should be focused by default using the DetailView model's DefaultFocusedItem property. Web applications set focus to the OK button (AcceptAction) in popup windows by default. To disable this behavior, deactivate FocusController. Here is an example:

                                [C#]
                                using DevExpress.ExpressApp; using DevExpress.ExpressApp.Web.SystemModule; using DXApplication8.Module.BusinessObjects; namespace DXApplication8.Module.Web.Controllers { public class DisableOKFocusController : ObjectViewController<DetailView, Parameters> { protected override void OnActivated() { base.OnActivated(); Frame.GetController<FocusController>().Active["Parameters DetailView"] = false; } protected override void OnDeactivated() { base.OnDeactivated(); Frame.GetController<FocusController>().Active.RemoveItem("Parameters DetailView"); } } }

                                I have also noticed that you are not using the recommended way of declaring non-persistent objects and showing their views. This may cause issues in the future. See our recommendations in the Non-Persistent Objects topic.

                                • Pavel Absolut 11.07.2018

                                  Many thanks