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

This class represents a relation between a parent object and a collection of child objects that are accessible via a property on the master object.

Definition

Namespace:Telerik.Windows.Data

Assembly:Telerik.Windows.Data.dll

Syntax:

C#
public class PropertyRelation : RelationBase, IRelation

Inheritance: objectRelationBasePropertyRelation

Implements: IRelation

Inherited Members RelationBase.NameRelationBase.IsSelfReference

Constructors

Initializes a new instance of the PropertyRelation class.

C#
public PropertyRelation()

Initializes a new instance of the PropertyRelation class.

C#
public PropertyRelation(string parentPropertyName)
Parameters:parentPropertyNamestring

Name of the parent property.

Properties

Gets or sets the name of the property on the parent object. For example if the parent object is of type Customer and it has an Orders property that contains a collection of Order objects, then this property should be set to "Orders".

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

The name of the parent property.

Methods

Gets the child data source.

C#
public override object GetDataSource(object context, DataItemCollection parentItems)
Parameters:contextobject

The data context.

parentItemsDataItemCollection

The parent items collection.

Returns:

object

Overrides: RelationBase.GetDataSource(object, DataItemCollection)