How to display a custom Detail View along with the List View when the split layout is activated

XAF Team Blog
29 July 2011

Split layout for List View

When the split layout is activated, the Detail View is displayed, together with the List View, in the same window. The detail View displays the currently selected object properties. The Detail View content changes dynamically, depending on the current object focused in the List View. This functionality is quite common for desktop applications. For instance, you will notice it in Microsoft Outlook (which I personally love and use a lot). Microsoft Access also offers the same option:

The beauty of this mode is that you can see record details within a single screen and are not be required to open a separate form. It is especially useful when you're using a List View with lots of records, to view and edit data. I imagine that you might also be using this mode for the same reason, correct?

So, XAF also provides this functionality out of the box (though it is currently available for Windows Forms applications only). If you are interested in learning more about this mode, please check out respective docs or play with the Main Demo application, demonstrating it.

If you think that it will also be useful for the Web, please describe these business scenarios, or provide links to other Web applications/screenshots, demonstrating this in action. We would love to learn more about it. You can put your feedback either in comments to this blog or in the corresponding suggestion in the Support Center.

Displaying short and full record details

If you are using the split layout (though it is called ListViewAndDetailView in XAF) mode, it is often convenient to distinguish modes when object details are shown along with the List View or when you open a separate window for editing. In the first case, I would be fine seeing short details:


and I would like to see full details and be able to do everything with my data in the latter case:


Take special note that the Roles, Permissions and Phone Numbers collection, and some other properties are presented only in the latter Detail View.

In the current version, it is very easy to do in code. Just create a ViewController for a required List View (or for all of them), override its OnActivated method and subscribe to the ListView.CreateCustomCurrentObjectDetailView event. Provide an identifier of a custom Detail View in it. Or, you can do this globally for all List Views in your application as described here. That’s it.

It becomes even easier in 11.2…

And, I have good news for those who like customizing via the Model Editor. I have added a new MasterDetailView property for the List View model element, and now you are able to perform the task above by setting only this property:


I actually used this approach to produce the screenshots above.

You may wonder why could not I use the existing DetailView attribute, but the problem with it is that if you specify a custom detail form with that attribute, it will be used everywhere for this ListView. As a result, you will not be able to specify different views for master detail mode and for regular mode.

Paradise for customizations and extensions

XAF is very flexible by nature, and it allows customizing literally everything it creates for you. Of course, split layout mode is not exception. For instance, if you would like to learn more on how to extend standard model elements with your own options (similar to what I demonstrated above), be sure to check out a wonderful Extend and Customize the Application Model in Code article in our docs.

Also, I think that the customization above is a good demonstration of two great XAF features among many others:

  • A great set of out-of-the-box features that are needed for modern LOB applications and addressing most common business needs of your clients;
  • Flexibility and extensibility – no one limits you and you are able to customize everything in your application, either in code, application model designers or using other standard and XAF-specific customization approaches.

There are of course more various customization options available in XAF. To quickly learn more about them, be sure to check out the following sections in our docs:

They contain a lot of useful information as well as the respective training videos and webinar recordings on our TV channel. If you experience any difficulty customizing XAF to implement your custom business tasks, feel free to contact our Support Team. We will be happy to help you.

Give us your feedback!

Please let us know whether you like this small improvement and blog post in general.

Also, as always, I would love to hear about your own XAF experiences - What do you like in XAF the most?

If you are not yet using XAF, then I would be grateful to hear whether you are considering it for your projects.

Thank you for all the feedback in advance. And happy XAFingWinking smile

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.