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

Represents a master-detail relation between two GridViewTemplates based on their column or field names.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public class GridViewRelation : INotifyPropertyChanged, ICloneable, IComparable

Inheritance: objectGridViewRelation

Implements: ICloneableIComparableINotifyPropertyChanged

Constructors

Initializes a new instance of the GridViewRelation class.

C#
public GridViewRelation()

Initializes a new instance of the GridViewRelation class.

C#
public GridViewRelation(GridViewTemplate parentTemplate, GridViewTemplate childTemplate)
Parameters:parentTemplateGridViewTemplate

The parent template.

childTemplateGridViewTemplate

The child template.

Initializes a new instance of the GridViewRelation class.

C#
public GridViewRelation(GridViewTemplate parent)
Parameters:parentGridViewTemplate

An instance of GridViewTemplate which is parent in the relation.

Properties

Gets or sets a StringCollection containing the names of the columns in the datails data source that takes part in the relation.

C#
public StringCollection ChildColumnNames { get; set; }

Gets or sets the child GridViewTemplate in the master-detail relation.

C#
[TypeConverter(typeof(ReferenceConverter))]
public GridViewTemplate ChildTemplate { get; set; }

Gets a value indicating whether this instance is object relational.

C#
[Browsable(false)]
public bool IsObjectRelational { get; }
Property Value:

true if this instance is object relational; otherwise, false.

Gets a value indicating whether this is self reference relation.

C#
[Browsable(false)]
public bool IsSelfReference { get; }
Property Value:

true if this relation is self reference; otherwise, false.

Gets a value indicating whether this is self reference relation with load on demand.

C#
[Browsable(false)]
public bool IsSelfReferenceLoadOnDemand { get; }
Property Value:

true if this relation is self reference with load on demand; otherwise, false.

Gets a value indicating whether this instance is valid.

C#
[Browsable(false)]
public bool IsValid { get; }
Property Value:

true if this instance is valid; otherwise, false.

Gets or sets a StringCollection containing the names of the columns in the master data source that takes part in the relation.

C#
public StringCollection ParentColumnNames { get; set; }

Gets or sets the parent GridViewTemplate in the master-detail relation.

C#
[TypeConverter(typeof(ReferenceConverter))]
public GridViewTemplate ParentTemplate { get; set; }

Gets or sets the name of the relation.

C#
public string RelationName { get; set; }

Methods

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

C#
public int CompareTo(object obj)
Parameters:objobject

An object to compare with this instance.

Returns:

int

A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes obj in the sort order. Zero This instance occurs in the same position in the sort order as obj. Greater than zero This instance follows obj in the sort order.

Exceptions:

ArgumentException

obj is not the same type as this instance.

Implements: IComparable.CompareTo(object)

Copies to the specific relation.

C#
public void CopyTo(GridViewRelation relation)
Parameters:relationGridViewRelation

The relation.

Raises the PropertyChanged event

C#
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

A PropertyChangedEventArgs instance containing event data.

Events

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged