# IDataSource.Capabilities Property

> IDataSource.Capabilities property in the TX Sheet Control .NET API: Describes supported request operations. Includes the syntax and a C# example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **Namespace:** `TXTextControl.TXSheetControl.Data`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Data.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Data > IDataSource > IDataSource.Capabilities Property
- **1040 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/idatasource/capabilities-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/idatasource/capabilities-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/idatasource/capabilities-property/llms-full.txt

---

Describes supported request operations.

### Syntax

```csharp
public DataSourceCapabilities Capabilities { get; }
```

### Property Value

`DataSourceCapabilities`.

### Examples

Request a bounded snapshot from an application-provided data source, honor its paging capability and write the returned columns and rows into a report.

```csharp
using TXTextControl.TXSheetControl.Data;
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> ExportProviderDataAsync(ServerSheetControl control, IDataSource source)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var request = new DataRequest { Limit = 100 };

    if (!source.Capabilities.HasFlag(DataSourceCapabilities.Paging)) request = new DataRequest();

    var data = await source.QueryAsync(request);

    if (data.Rows.Count == 0) return await control.SaveAsync(StreamType.PDF);

    var lastColumn = "";

    for (var index = data.Columns.Count; index > 0; index /= 26) { index--; lastColumn = (char)(65 + index % 26) + lastColumn; }

    await sheet.Range("A1:" + lastColumn + "1").SetValuesAsync([data.Columns.Cast<object?>().ToArray()]);
    await sheet.Range("A2:" + lastColumn + (data.Rows.Count + 1)).SetValuesAsync(data.Rows.Select(row => row.ToArray()).ToArray());
    return await control.SaveAsync(StreamType.PDF);
}
```

### Remarks

Use the member with an instance or settings object from the documented package. Await task-returning operations. Document-bound handles must be resolved again after loading or deleting their owner.

### See Also

- [IDataSource Interface](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/idatasource/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)
- [DataSourceCapabilities Enumeration](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/datasourcecapabilities/llms-full.txt)

---

## Nearby

- **Previous:** [IDataSource Interface](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/idatasource/llms-full.txt)
- **Next:** [IDataSource.QueryAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/idatasource/queryasync-method/llms-full.txt)
