# IDataRowAdapter.GetChildRows Method

> Returns the data of a child relation with a given name as an array of IDataRowAdapter instances.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl.DocumentServer.DataSources > IDataRowAdapter.GetChildRows Method
- **502 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/idatarowadapter/getchildrows-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/idatarowadapter/getchildrows-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/idatarowadapter/getchildrows-method/llms-full.txt

---

### Description

Returns the data of a child relation with a given name as an array of IDataRowAdapter instances.

### Syntax

```csharp
IDataRowAdapter[] GetChildRows(string childTableName);
```

```vbnet
Function GetChildRows(childTableName As String) As IDataRowAdapter()
```

### Parameters

| Parameter | Description |
|---|---|
| childTableName | The name of the child table / the child relation. |

### Return Value

An array of data rows if the relation with the given name exists or null.

### Examples

The following example retrieves child rows from the idata row adapter.

```csharp
TXTextControl.DocumentServer.DataSources.IDataRowAdapter[] results = iDataRowAdapter.GetChildRows("CustomerName");
foreach (TXTextControl.DocumentServer.DataSources.IDataRowAdapter iDataRowAdapterItem in results)
{
    Console.WriteLine(iDataRowAdapterItem);
}
```

```vbnet
Dim results As TXTextControl.DocumentServer.DataSources.IDataRowAdapter() = iDataRowAdapter.GetChildRows("CustomerName")
For Each iDataRowAdapterItem As TXTextControl.DocumentServer.DataSources.IDataRowAdapter In results
    Console.WriteLine(iDataRowAdapterItem)
Next
```

---

## Nearby

- **Previous:** [IDataRowAdapter Interface](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/idatarowadapter/llms-full.txt)
- **Next:** [IDataRowAdapter.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/idatarowadapter/item-property/llms-full.txt)
