Class
RadDataServiceDataSource

Provides an object for loading, paging, filtering, sorting and editing entities coming from a WCF Data Service.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.DataServices.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Data")]
public class RadDataServiceDataSource : Control

Inheritance: objectRadDataServiceDataSource

Constructors

RadDataServiceDataSource()

Initializes a new instance of the RadDataServiceDataSource class.

Declaration

cs-api-definition
public RadDataServiceDataSource()

Fields

AutoLoadProperty

Identifies AutoLoad dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoLoadProperty

Field Value

DependencyProperty

CanLoadProperty

Identifies CanLoad dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CanLoadProperty

Field Value

DependencyProperty

DataServiceContextProperty

Identifies DataServiceContext dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DataServiceContextProperty

Field Value

DependencyProperty

ExpandProperty

Identifies Expand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExpandProperty

Field Value

DependencyProperty

HasChangesProperty

Identifies HasChanges dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasChangesProperty

Field Value

DependencyProperty

IsBusyProperty

Identifies IsBusy dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsBusyProperty

Field Value

DependencyProperty

IsLoadingDataProperty

Identifies IsLoadingData dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsLoadingDataProperty

Field Value

DependencyProperty

IsSubmittingChangesProperty

Identifies IsSubmittingChanges dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSubmittingChangesProperty

Field Value

DependencyProperty

LoadDelayProperty

Identifies LoadDelay dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty LoadDelayProperty

Field Value

DependencyProperty

PageSizeProperty

Identifies PageSize dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PageSizeProperty

Field Value

DependencyProperty

QueryNameProperty

Identifies QueryName dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty QueryNameProperty

Field Value

DependencyProperty

Properties

AutoLoad

Gets or sets a value indicating whether Load is automatically invoked when a change occurs that impacts the query composed by the data source.

Declaration

cs-api-definition
public bool AutoLoad { get; set; }

Property Value

bool

true if the data source is will automatically invoke Load when a change occurs that impacts the query composed by the data source; otherwise, false.

CanLoad

Gets a value indicating whether the control can perform a load operation based on the present state.

Declaration

cs-api-definition
public bool CanLoad { get; }

Property Value

bool

true if this instance can load data; otherwise, false.

CancelLoadCommand

Gets the command for cancelling load.

Declaration

cs-api-definition
public ICommand CancelLoadCommand { get; }

Property Value

ICommand

The command for cancelling load.

CancelSubmitCommand

Gets the command for cancelling submit.

Declaration

cs-api-definition
public ICommand CancelSubmitCommand { get; }

Property Value

ICommand

The command for cancelling submit.

DataServiceContext

Gets or sets the WCF DataServiceContext instance used for executing the load and submit operations.

Declaration

cs-api-definition
public DataServiceContext DataServiceContext { get; set; }

Property Value

DataServiceContext

The WCF DataServiceContext.

Remarks

The only supported DataServiceContext.MergeOption is MergeOption.OverwriteChanges. Setting the MergeOption to anything else will result in an InvalidOperationException.

DataView

Gets the current view of entities resulting from the last load operation, using a DataItemCollection.

Declaration

cs-api-definition
public DataItemCollection DataView { get; }

Property Value

DataItemCollection

The current view of entities resulting from the last load operation.

Expand

Gets or sets the expand option.

Declaration

cs-api-definition
public string Expand { get; set; }

Property Value

string

The expand option.

Remarks

For more information, please visit .

FilterDescriptors

Gets the filter descriptors used for filtering operations.

Declaration

cs-api-definition
public CompositeFilterDescriptorCollection FilterDescriptors { get; }

Property Value

CompositeFilterDescriptorCollection

The filter descriptors.

GroupDescriptors

Gets the group descriptors used for grouping operations.

Declaration

cs-api-definition
public GroupDescriptorCollection GroupDescriptors { get; }

Property Value

GroupDescriptorCollection

The group descriptors.

HasChanges

Gets a value indicating whether the DataServiceContext currently has any entities with pending changes.

Declaration

cs-api-definition
public bool HasChanges { get; }

Property Value

bool

true if DataServiceContext has changes; otherwise, false.

IsBusy

Gets or sets a value indicating whether the dataService data source is busy (loading or submitting).

Declaration

cs-api-definition
public bool IsBusy { get; }

Property Value

bool

true if the dataService data source is busy; otherwise, false.

IsLoadingData

Gets a value indicating whether RadDataServiceDataSource is currently loading data.

Declaration

cs-api-definition
public bool IsLoadingData { get; }

Property Value

bool

true if this instance is loading data; otherwise, false.

IsSubmittingChanges

Gets a value indicating whether RadDataServiceDataSource is currently submitting changes as a result of a call to SubmitChanges().

Declaration

cs-api-definition
public bool IsSubmittingChanges { get; }

Property Value

bool

true if this instance is submitting changes; otherwise, false.

LoadCommand

Gets the command for loading data.

Declaration

cs-api-definition
public ICommand LoadCommand { get; }

Property Value

ICommand

The command for loading data.

LoadDelay

Gets or sets the delay before an automatic data loading operation is started.

Declaration

cs-api-definition
public TimeSpan LoadDelay { get; set; }

Property Value

TimeSpan

The delay before an automatic data loading operation is started.

PageSize

Gets or sets the number of items displayed on each page of the view returned from Data, or 0 to disable paging. A non-zero page size will cause the number of entities loaded with each Load operation to be limited as well, using server-side paging.

Declaration

cs-api-definition
public int PageSize { get; set; }

Property Value

int

The size of the page.

QueryName

Gets or sets the name of the query to use for loading.

Declaration

cs-api-definition
public string QueryName { get; set; }

Property Value

string

The name of the query to use for loading data.

Remarks

The DataServiceContext will be searched for a method that returns an EntityQuery, with a name that matches the name provided to QueryName. The matched name can be with or without a "Query" suffix.

RejectChangesCommand

Gets the command for rejecting changes.

Declaration

cs-api-definition
public ICommand RejectChangesCommand { get; }

Property Value

ICommand

The command for rejecting changes.

SortDescriptors

Gets the sort descriptors used for sorting operations.

Declaration

cs-api-definition
public SortDescriptorCollection SortDescriptors { get; }

Property Value

SortDescriptorCollection

The sort descriptors.

SubmitChangesCommand

Gets the command for submitting changes.

Declaration

cs-api-definition
public ICommand SubmitChangesCommand { get; }

Property Value

ICommand

The command for submitting changes.

Methods

BeginInit()

Starts the initialization process for this element.

Declaration

cs-api-definition
public override void BeginInit()

CancelLoad()

Cancels the current load operation if any.

Declaration

cs-api-definition
public void CancelLoad()

CancelSubmit()

Cancels the current submit operation if any.

Declaration

cs-api-definition
public void CancelSubmit()

EndInit()

Indicates that the initialization process for the element is complete.

Declaration

cs-api-definition
public override void EndInit()

Exceptions

InvalidOperationException

was called without having previously been called on the element.

Load()

Initiates a Load operation if possible.

Declaration

cs-api-definition
public void Load()

RejectChanges()

Rejects all changes.

Declaration

cs-api-definition
public void RejectChanges()

SubmitChanges()

Initiates a Submit operation if possible.

Declaration

cs-api-definition
public void SubmitChanges()

Events

LoadedData

Occurs when a data loading operation is completed.

Declaration

cs-api-definition
public event EventHandler<LoadedDataEventArgs> LoadedData

Event Value

EventHandler<LoadedDataEventArgs>

LoadingData

Occurs when a data loading operation is started.

Declaration

cs-api-definition
public event EventHandler<LoadingDataEventArgs> LoadingData

Event Value

EventHandler<LoadingDataEventArgs>

SubmittedChanges

Event raised whenever a submit operation is completed.

Declaration

cs-api-definition
public event EventHandler<DataServiceSubmittedChangesEventArgs> SubmittedChanges

Event Value

EventHandler<DataServiceSubmittedChangesEventArgs>

SubmittingChanges

Event raised whenever a submit operation is launched.

Declaration

cs-api-definition
public event EventHandler<DataServiceSubmittingChangesEventArgs> SubmittingChanges

Event Value

EventHandler<DataServiceSubmittingChangesEventArgs>