TableQuery.AddRelation(String, String, String, String) Method
Creates a master-detail relation between two data tables across the specified key columns.
Namespace: DevExpress.DataAccess.Sql
Assembly: DevExpress.DataAccess.v24.1.dll
NuGet Packages: DevExpress.DataAccess, DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap
Declaration
public RelationInfo AddRelation(
string parentTable,
string nestedTable,
string parentKeyColumn,
string nestedKeyColumn
)
Parameters
Name | Type | Description |
---|---|---|
parentTable | String | A String value, specifying the parent table name. This value is assigned to the RelationInfo.ParentTable property of the created RelationInfo object. |
nestedTable | String | A String value, specifying the nested table name. This value is assigned to the RelationInfo.NestedTable property of the created RelationInfo object. |
parentKeyColumn | String | A String value, specifying the parent key column name. This value is assigned to the RelationColumnInfo.ParentKeyColumn property of the created RelationColumnInfo object. |
nestedKeyColumn | String | A String value, specifying the nested key column name. This value is assigned to the RelationColumnInfo.NestedKeyColumn property of the created RelationColumnInfo object. |
Returns
Type | Description |
---|---|
RelationInfo | A RelationInfo object, identifying the data relation. |