# DataSourceManager.DataRelations Property

> Gets a DataRelationInfoCollection of DataRelationInfo objects which represent the data relations in the data source.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.DataSources > DataSourceManager.DataRelations Property
- **422 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/datarelations-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/datarelations-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/datarelations-property/llms-full.txt

---

### Description

Gets a [DataRelationInfoCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/llms-full.txt) of [DataRelationInfo](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datarelationinfo/llms-full.txt) objects which represent the data relations in the data source.

### Syntax

```csharp
public DataRelationInfoCollection DataRelations { get; }
```

```vbnet
Public ReadOnly Property DataRelations As DataRelationInfoCollection
```

### Examples

The following example iterates through the data relations collection and processes each data relation info.

```csharp
foreach (TXTextControl.DocumentServer.DataSources.DataRelationInfo dataRelationInfo in dataSourceManager.DataRelations)
{
    Console.WriteLine(dataRelationInfo.RelationName);
}
```

```vbnet
For Each dataRelationInfo As TXTextControl.DocumentServer.DataSources.DataRelationInfo In dataSourceManager.DataRelations
    Console.WriteLine(dataRelationInfo.RelationName)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [DataSourceManager.DataProviderNameChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/dataprovidernamechanged-event/llms-full.txt)
- **Next:** [DataSourceManager.DataRelationsChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/datarelationschanged-event/llms-full.txt)
