combit List & Label 24 - .NET Online Web Help
GetRelation Method
Example 


combit.ListLabel24.DataProviders Namespace > IDataProvider Interface : GetRelation Method
The name of the relation to return. The parameter relationName can also contain a relation name that is not available in the data provider (e.g. in combination with the usage of a DataProviderCollection). In this case the return value of the method has to be null.
This method is called whenever a relation is queried from the data provider.
Syntax
'Declaration
 
Function GetRelation( _
   ByVal relationName As String _
) As ITableRelation

Parameters

relationName
The name of the relation to return. The parameter relationName can also contain a relation name that is not available in the data provider (e.g. in combination with the usage of a DataProviderCollection). In this case the return value of the method has to be null.
Example
ITableRelation GetRelation(string relationName)
{
    // DataRelationWrapper needs to implement ITableRelation
    return new DataRelationWrapper(_dataViewManager.DataSet.Relations[relationName]);
}
Function GetRelation(relationName As String) As ITableRelation
    ' DataRelationWrapper needs to implement ITableRelation 
    Return New DataRelationWrapper(_dataViewManager.DataSet.Relations(relationName))
End Function
Requirements

Platforms: Windows Vista - Windows 10 Version 1809, Windows Server 2008 - 2016

See Also

Reference

IDataProvider Interface
IDataProvider Members