Class
PropertyRelation

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:

cs-api-definition
public class PropertyRelation : RelationBase, IRelation

Inheritance: objectRelationBasePropertyRelation

Implements: IRelation

Inherited Members RelationBase.NameRelationBase.IsSelfReference

Constructors

PropertyRelation()

Initializes a new instance of the PropertyRelation class.

Declaration

cs-api-definition
public PropertyRelation()

PropertyRelation(string)

Initializes a new instance of the PropertyRelation class.

Declaration

cs-api-definition
public PropertyRelation(string parentPropertyName)

Parameters

parentPropertyName

string

Name of the parent property.

Properties

ParentPropertyName

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".

Declaration

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

Property Value

string

The name of the parent property.

Methods

GetDataSource(object, DataItemCollection)

Gets the child data source.

Declaration

cs-api-definition
public override object GetDataSource(object context, DataItemCollection parentItems)

Parameters

context

object

The data context.

parentItems

DataItemCollection

The parent items collection.

Returns

object

Overrides RelationBase.GetDataSource(object, DataItemCollection)