ComponentOne DataObjects for .NET
GetParentRow Event

C1.Data.2 Assembly > C1.Data Namespace > C1DataSetLogic Class : GetParentRow Event
Used to programmatically specify the parent row for a relation.
Syntax
'Declaration
 
Public Event GetParentRow As GetListEventHandler
public event GetListEventHandler GetParentRow
Event Data

The event handler receives an argument of type GetListEventArgs containing data related to this event. The following GetListEventArgs properties provide information specific to this event.

PropertyDescription
This argument contains the list of rows. In events returning a list, create a new ArrayList object, fill it with rows and assign to the List argument. In events returning a single row (for example, GetParentRow:C1DataSetLogic event), add a single row to the list.  
The name of the relation (in GetRows:C1DataView event, empty if the view is not a child view).  
The row on which to base the list. In GetParentRow:C1DataSetLogic event, the parent row of the view, if it is a child view. In GetChildRows:C1DataSetLogic event, the parent row for which to return child rows.  
Remarks
This event can be used in addition to GetChildRows event for two-way custom view relations. If the C1.Data.SchemaObjects.ViewRelation.OneWay property is set to True, the custom relation does not support getting parent row (note that only GetChildRows is used for master-detail data binding, GetParentRow is not necessary, it may only be needed in code). If C1.Data.SchemaObjects.ViewRelation.OneWay =False for a custom relation, C1DataObjects calls the GetParentRow event to obtain the parent row whenever C1DataRow.GetParentRow is called.
See Also

Reference

C1DataSetLogic Class
C1DataSetLogic Members
C1ExpressConnection Class
View Relations