View the Training Dashboard Use Case

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

When employees log on to the Training Management application, they can see the training dashboard by clicking My Training in the Quick Launch. The dashboard displays the list of available training courses and the list of courses that the current employee has registered for. Figure 1 an example of the training dashboard.

Ff649097.trainingdashboard_v1p2(en-us,PandP.10).png

Figure 1
Training dashboard

Training Courses and My Registrations Web Parts

The Training Courses and My Registrations Web Parts are SharePoint List View Web Parts. The Training Courses Web Part is a default list view. The My Registrations Web Part is based on a custom view of the registrations list. Because the data for these two Web Parts is in SharePoint, the standard List View Web Part, combined with a custom view for the My Registrations Web Part, is an ideal way to display it. There is no need to develop a custom user interface.

The My Registrations Web Part is based on the following code that defines the custom registrations list view. The code is located in the ListDefinitions\RegistrationListDefinition\schema.xml file in the Contoso.TrainingManagement project.

...        
<ViewFields>
    <FieldRef Name="LinkTitle">
    </FieldRef>
    <FieldRef Name="RegistrationStatus">
    </FieldRef>
</ViewFields>             
<Query>
    <Where>
        <Eq>
            <FieldRef Name="User" />
            <Value Type="Integer">                            
                <UserID />
            </Value>
        </Eq>
    </Where>
    <OrderBy>
        <FieldRef Name="RegistrationStatus" />
    </OrderBy>
</Query>
 ....

The List View definition creates an instance of a List View Web Part on the Default.aspx page that displays the custom registrations list view. The code for the definition is located in the Forms\TrainingDashboard\TrainingDashboardElement.xml file of the Contoso.TrainingManagement project.

<View List="Lists/Registrations" BaseViewID="2" RecurrenceRowset="TRUE"
      WebPartZoneID="Left" WebPartOrder="4">
    <![CDATA[
         <WebPart xmlns=http://schemas.microsoft.com/WebPart/v2
                        xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/Image">
             <Assembly>Microsoft.SharePoint, Version=12.0.0.0,
                      Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
             <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
             <Title>My Registrations</Title>
         </WebPart>
     ]]>
</View>






Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Show: