Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi,
                                    My application is XAF Web application.
                                    In a popup action I show a DetailView of a certain object in an edit mode, where one of the properties is of enum type.
                                    Let's say that the enum is defined:
                                    public enum MyEnumVals{MyEnum1, MyEnum2, My Enum3};

                                    The property that holds the enum values is displayed in a combobox, and that's good.
                                    According to a condition that I check in the CustomizePopupWindowParams event handler, I want to remove one value from the combobox (MyEnum1 for example). (So the combo will only include MyEnum2 and My Enum3 in the example above).

                                    How can this be done?

                                    Thanks,
                                    Golan

                                0

                                Hello Golan,

                                To accomplish this task, use the following solution:
                                1. Subscribe to the DetailView's ControlsCreated event.
                                2. Get the enum property's editor via the DetailView.FindItem method.
                                3. Access its control, which is ImageComboBoxEdit.
                                4. Remove the required item from the control's Properties.Items collection.

                                Thanks,
                                Anatol

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners