Show all versions on dispform-Sharepoint 2007

Posted on 2011-10-24
Last Modified: 2012-05-12
I have a modified version of the helpdesk template.

I'd like the version info to display on the bottom of this page, to show the history of that support request.  I really just want to see one or two fields ideally, but I'll take what I can get.  What's the best way to do this?  I've looked at the versions.aspx for some hints, but that gets messy fast.  Thanks.
Question by:IntercareSupport
    LVL 18

    Accepted Solution

    First you should create a custom list form (
    or a custom field type to add your control to the display form. Then you need code to show item versions. The code is not too complicated - just something like this:

    SPListItemVersionCollection versions = ServiceRequest.GetItem().Versions;
    for (int i = versions.Count - 1; i >= 0; i--)
           TableRow row = CreateVersionRow(versions[ i ]);

    If you give more details on what you're trying to do, I'll provide you more samples. Hope that helps!

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now