Displaying Large Datasets in Silverlight

Version: 1.0.0

Description

Lab 2 of this module demonstrated basic databinding by showing how to wire a collection directly to a Silverlight control. That works great for smaller collections of data, but what about large collection - numbering in the thousands. What is the best way to handle those scenarios? This lab walks through one possibility - breaking the dataset down into smaller chunks and moving through the data one page at a time.

Overview

Lab 2 of this module demonstrated basic databinding by showing how to wire a collection directly to a Silverlight control. That works great for smaller collections of data, but what about large collection – numbering in the thousands. What is the best way to handle those scenarios?

This lab walks through one possibility – breaking the dataset down into smaller chunks and moving through the data one page at a time.

Objectives

This lab will demonstrate how to use the ListItemCollectionPosition object to control our position in the dataset. This allows us to request the next page of data and simply bind that to our controls.

System Requirements

You must have the following items to complete this lab:

  • 2010 Information Worker Demonstration and Evaluation Virtual Machine
  • Microsoft Visual Studio 2010
  • Silverlight 4
  • Silverlight web part extension for Visual Studio
  • Silverlight 4 Toolkit

Setup

The setup and configuration for this demo involves the following tasks:

  • Task 1 - Start the Microsoft 2010 Information Worker Demonstration and Evaluation Virtual Machine (RTM).
  • Task 2 - Make sure that Silverlight version 4 is installed on the machine
  • Task 3 - Install the Silverlight Web parts Extensions into Visual Studio 2010
  • Task 4 - Make sure that the Silverlight 4 Tools for Visual Studio are installed on the machine
  • Task 5 - Configure the environment for this demo

Task 1 – Starting The Microsoft 2010 Information Worker Demonstration And Evaluation Virtual Machine (RTM)

  1. Follow the instructions in the Virtual Machine Setup Guide.docx file you will find at the following location:

    https://www.microsoft.com/downloads/en/details.aspx?FamilyID=751fa0d1-356c-4002-9c60-d539896c66ce&displaylang=en

Task 2 – Making Sure That Silverlight Version 4 Is Installed On The Machine

  1. Download Silverlight 4 from here: https://www.silverlight.net and install

Task 3 – Installing The Silverlight Web Parts Extensions Into Visual Studio 2010

  1. Download the Silverlight and SharePoint VSIX extensions from here: https://code.msdn.microsoft.com/vsixforsp/Release/ProjectReleases.aspx?ReleaseId=4177
  2. Extract the files to your hard drive
  3. Close Visual Studio if it is open
  4. Double-click on the VSIX.SharePoint.Silverlight.vsix file to run the extension installer

Task 4 – Making Sure That The Silverlight 4 Tools For Visual Studio Are Installed On The Machine

  1. Download from here: https://www.microsoft.com/downloads/en/details.aspx?FamilyID=b3deb194-ca86-4fb6-a716-b67c2604a139 and install

Task 5 – Configuring the Environment For This Demo

  1. Run the SetupLab.cmd file from the <INSTALL>\Labs\DisplayingLargeDatasetsSL\Source\Begin folder to establish the SharePoint environment necessary for this lab.

Exercises

This Hands-On Lab encompasses the following exercises:

  1. Breaking up the Dataset
  2. Requesting a Page of Data

Estimated time to complete this lab: 30 minutes.

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. The lab provides the following Visual Studio solutions that you can use as starting point for the exercises.
    • <INSTALL>\Labs\DisplayingLargeDatasetsSL\Source\Begin\LargeData.sln: This solution contains the initial starting point for all of the exercises in this lab.
    Note:
    Inside each exercise folder, you will find an end folder containing a solution with the completed lab exercise.