Search This Blog

Monday, June 26, 2017

AuditTrail - How to show the change history for the current object in a separate form instead of a nested ListView

I wanted to draw your attention to the scenario and solution in our Support Center, which were found helpful by at least 4 other XAF customers using XPO for data access. As you know, by default, we offer our users a solution based on the nested ListView, which is automatically generated when you declare a collection property like this one:

    public XPCollection<AuditDataItemPersistent> AuditTrail {
        get {
            if(auditTrail == null) {
               auditTrail = AuditedObjectWeakReference.GetAuditTrail(Session, this);
            return auditTrail;

The solution I am promoting allows you to keep the layout less complex and invoke this rarely used or quite advanced feature from a small PopupWindowShowAction showing a ListView:

It will be interesting to hear about your preferences in this regard. Please let me know in comments. Thanks!


  1. Thank you Dennis for posting this.
    It is an elegant solution.
    At the moment, I implemented it in each class DetailView, in a separate tab.
    I will definitely consider your solution.

  2. imho separate form is better options. Its not visible during normal work with program and not disturb user. When he want see change history should use any shortcut or button on the ribbon.
    Is this possible to use now ?

    1. Yes, a separate form is possible (check the ticket link for a possible implementation).