New to Telerik UI for WPFStart a free 30-day trial

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:

C#
[TelerikToolboxCategory("Data")]
public class RadDataServiceDataSource : Control

Inheritance: objectRadDataServiceDataSource

Constructors

Initializes a new instance of the RadDataServiceDataSource class.

C#
public RadDataServiceDataSource()

Fields

AutoLoadProperty

DependencyProperty

Identifies AutoLoad dependency property.

C#
public static readonly DependencyProperty AutoLoadProperty

CanLoadProperty

DependencyProperty

Identifies CanLoad dependency property.

C#
public static readonly DependencyProperty CanLoadProperty

DataServiceContextProperty

DependencyProperty

Identifies DataServiceContext dependency property.

C#
public static readonly DependencyProperty DataServiceContextProperty

ExpandProperty

DependencyProperty

Identifies Expand dependency property.

C#
public static readonly DependencyProperty ExpandProperty

HasChangesProperty

DependencyProperty

Identifies HasChanges dependency property.

C#
public static readonly DependencyProperty HasChangesProperty

IsBusyProperty

DependencyProperty

Identifies IsBusy dependency property.

C#
public static readonly DependencyProperty IsBusyProperty

IsLoadingDataProperty

DependencyProperty

Identifies IsLoadingData dependency property.

C#
public static readonly DependencyProperty IsLoadingDataProperty

IsSubmittingChangesProperty

DependencyProperty

Identifies IsSubmittingChanges dependency property.

C#
public static readonly DependencyProperty IsSubmittingChangesProperty

LoadDelayProperty

DependencyProperty

Identifies LoadDelay dependency property.

C#
public static readonly DependencyProperty LoadDelayProperty

PageSizeProperty

DependencyProperty

Identifies PageSize dependency property.

C#
public static readonly DependencyProperty PageSizeProperty

QueryNameProperty

DependencyProperty

Identifies QueryName dependency property.

C#
public static readonly DependencyProperty QueryNameProperty

Properties

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

C#
public bool AutoLoad { get; set; }
Property Value:

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.

Gets the command for cancelling load.

C#
public ICommand CancelLoadCommand { get; }
Property Value:

The command for cancelling load.

Gets the command for cancelling submit.

C#
public ICommand CancelSubmitCommand { get; }
Property Value:

The command for cancelling submit.

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

C#
public bool CanLoad { get; }
Property Value:

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

DataServiceContext

DataServiceContext

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

C#
public DataServiceContext DataServiceContext { get; set; }
Property Value:

The WCF DataServiceContext.

Remarks:

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

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

C#
public DataItemCollection DataView { get; }
Property Value:

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

Gets or sets the expand option.

C#
public string Expand { get; set; }
Property Value:

The expand option.

Remarks:

For more information, please visit .

Gets the filter descriptors used for filtering operations.

C#
public CompositeFilterDescriptorCollection FilterDescriptors { get; }
Property Value:

The filter descriptors.

Gets the group descriptors used for grouping operations.

C#
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value:

The group descriptors.

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

C#
public bool HasChanges { get; }
Property Value:

true if DataServiceContext has changes; otherwise, false.

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

C#
public bool IsBusy { get; }
Property Value:

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

Gets a value indicating whether RadDataServiceDataSource is currently loading data.

C#
public bool IsLoadingData { get; }
Property Value:

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

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

C#
public bool IsSubmittingChanges { get; }
Property Value:

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

Gets the command for loading data.

C#
public ICommand LoadCommand { get; }
Property Value:

The command for loading data.

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

C#
public TimeSpan LoadDelay { get; set; }
Property Value:

The delay before an automatic data loading operation is started.

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.

C#
public int PageSize { get; set; }
Property Value:

The size of the page.

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

C#
public string QueryName { get; set; }
Property Value:

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.

Gets the command for rejecting changes.

C#
public ICommand RejectChangesCommand { get; }
Property Value:

The command for rejecting changes.

Gets the sort descriptors used for sorting operations.

C#
public SortDescriptorCollection SortDescriptors { get; }
Property Value:

The sort descriptors.

Gets the command for submitting changes.

C#
public ICommand SubmitChangesCommand { get; }
Property Value:

The command for submitting changes.

Methods

Starts the initialization process for this element.

C#
public override void BeginInit()

Cancels the current load operation if any.

C#
public void CancelLoad()

Cancels the current submit operation if any.

C#
public void CancelSubmit()

Indicates that the initialization process for the element is complete.

C#
public override void EndInit()
Exceptions:

InvalidOperationException

was called without having previously been called on the element.

Initiates a Load operation if possible.

C#
public void Load()

Rejects all changes.

C#
public void RejectChanges()

Initiates a Submit operation if possible.

C#
public void SubmitChanges()

Events

Occurs when a data loading operation is completed.

C#
public event EventHandler<LoadedDataEventArgs> LoadedData

Occurs when a data loading operation is started.

C#
public event EventHandler<LoadingDataEventArgs> LoadingData

Event raised whenever a submit operation is completed.

C#
public event EventHandler<DataServiceSubmittedChangesEventArgs> SubmittedChanges

Event raised whenever a submit operation is launched.

C#
public event EventHandler<DataServiceSubmittingChangesEventArgs> SubmittingChanges