Class RadEntityFrameworkDataSource
Provides an object for loading, paging, filtering, sorting, and editing entities coming from Entity Framework's ObjectContext.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.EntityFramework.dll
Syntax
[TelerikToolboxCategory("Data")]
public class RadEntityFrameworkDataSource : Control
Constructors
RadEntityFrameworkDataSource()
Initializes a new instance of the RadEntityFrameworkDataSource class.
Declaration
public RadEntityFrameworkDataSource()
Fields
DbContextProperty
Identifies DbContext dependency property.
Declaration
public static readonly DependencyProperty DbContextProperty
Field Value
System.Windows.DependencyProperty
|
ObjectContextProperty
Identifies ObjectContext dependency property.
Declaration
public static readonly DependencyProperty ObjectContextProperty
Field Value
System.Windows.DependencyProperty
|
QueryNameProperty
Identifies QueryName dependency property.
Declaration
public static readonly DependencyProperty QueryNameProperty
Field Value
System.Windows.DependencyProperty
|
Properties
DataView
Gets the current view of entities resulting from the last load operation, using a DataItemCollection.
Declaration
public DataItemCollection DataView { get; }
Property Value
DataItemCollection
The current view of entities resulting from the last load operation. |
DbContext
Gets or sets the DbContext instance used for executing the load and submit operations.
Declaration
public DbContext DbContext { get; set; }
Property Value
System.Data.Entity.DbContext
The context. |
FilterDescriptors
Gets the filter descriptors used for filtering operations.
Declaration
public CompositeFilterDescriptorCollection FilterDescriptors { get; }
Property Value
CompositeFilterDescriptorCollection
The filter descriptors. |
GroupDescriptors
Gets the group descriptors used for grouping operations.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
GroupDescriptorCollection
The group descriptors. |
LoadCommand
Gets the command for loading data.
Declaration
public ICommand LoadCommand { get; }
Property Value
System.Windows.Input.ICommand
The command for loading data. |
ObjectContext
Gets or sets the Entity Framework ObjectContext instance used for executing the load and submit operations.
Declaration
public ObjectContext ObjectContext { get; set; }
Property Value
System.Data.Objects.ObjectContext
The Entity Framework ObjectContext. |
QueryName
Gets or sets the name of the query to use for loading.
Declaration
public string QueryName { get; set; }
Property Value
System.String
The name of the query to use for loading data. |
RelatedObjects
The names of the related entities.
Declaration
public Collection<string> RelatedObjects { get; }
Property Value
System.Collections.ObjectModel.Collection<System.String>
The names of the related entities. |
Remarks
For example, if your main entity set is called "Orders", you might want to add "OrderDetails" to this collection in case you want to get the related OrderDetails for each Order from the database.
SortDescriptors
Gets the sort descriptors used for sorting operations.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
SortDescriptorCollection
The sort descriptors. |
SubmitChangesCommand
Gets the command for submitting changes.
Declaration
public ICommand SubmitChangesCommand { get; }
Property Value
System.Windows.Input.ICommand
The command for submitting changes. |
Methods
CreateView()
Creates the view.
Declaration
protected virtual QueryableCollectionView CreateView()
Returns
QueryableCollectionView
The view. |
IsValidQueryProperty(PropertyInfo)
Determines whether the property is a valid query property.
Declaration
public static bool IsValidQueryProperty(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo
propertyInfo
The property info. |
Returns
System.Boolean
|
Load()
Initiates a Load operation if possible.
Declaration
public void Load()
SubmitChanges()
Initiates a Submit operation if possible.
Declaration
public void SubmitChanges()