DataServiceCollection<T>.LoadNextPartialSetAsync Method

WCF Data Services 5.0

Loads the next page of data into the collection.

Supported only by the WCF Data Services 5.0 client for Silverlight.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client.SL (in Microsoft.Data.Services.Client.SL.dll)

public bool LoadNextPartialSetAsync()

Return Value

Type: System.Boolean
A Boolean value that is true when the DataServiceCollection<T> has a continuation token; otherwise false.

The LoadNextPartialSetAsync method only returns true and loads the next page of data when paging is enabled in the data service and when a continuation token can be accessed from the Continuation property. When the Continuation property is null, a request is not sent to the data service. For more information, see Creating the Northwind Data Service (WCF Data Services/Silverlight).

Because the LoadNextPartialSetAsync method is asynchronous, the method returns before a response to the data service is received. You must handle the LoadCompleted event to access the QueryOperationResponse<T> that contains information about the result of the load operation. Items are loaded into the collection when the load operation is complete, whether or not the LoadCompleted event is handled.

The LoadNextPartialSetAsync method can be called only once on the UI thread. The method cannot be called again until after the LoadCompleted event is raised. The LoadCompleted event is raised whether or not the query succeeds.

Show: