How to set a propertyeditor's visibility in ViewController .
How to hide a Property Editor or View Item in a ViewController at runtime
Answers
Hello,
Thank you for contacting us. There are several good options for this task:
1. In DetailView, you can access a required PropertyEditor instance as per the Access Editor Settings help article and then cast it to the IAppearanceVisibility type for setting its Visibility property:
C#using DevExpress.ExpressApp.Editors;
...
((IAppearanceVisibility)thePropertyEditor).Visibility = ViewItemVisibility.Hide;
...
Standard XAF property editors correctly implement the DevExpress.ExpressApp.Editors > IAppearanceVisibility > Visibility contract and thus, will hide the editor correctly from the layout.
2. You can reuse the built-in Conditional Appearance module APIs:
How to: Hide the 'Protected Content' Columns in a List View and Property Editors in a Detail View
How to: Disable and Hide Property Editors Based on a Business Rule
3. You can use VisibleInListView/VisibleInLookupListView and VisibleInDetailView attributes to mark a ListView column or a DetailView editor invisible. For more information, see List View Column Generation. It is also possible to show, hide and reorder fields at runtime in both ListView and DetailView for WinForms and WebForms/Blazor (ListView only). For more information, see List View Columns Customization and View Items Layout Customization.
Search keywords
invisible, hide, remove, visible, show, display, view, DetailView, layout, ListView, column