# WorkbookDataBinding.RefreshDashboardAsync Method

> WorkbookDataBinding.RefreshDashboardAsync method in the TX Sheet Control .NET API: Refreshes a direct dashboard source with no worksheet.

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

---

Refreshes a direct dashboard source with no worksheet. Persists only logical IDs and name. Source registration and transient replacement share one workbook batch. Failures retain previous data.

### Syntax

```csharp
public Task<DataSnapshot> RefreshDashboardAsync(AnalyticsSource source, DataRequest? request = null, DataQueryOptions? options = null, CancellationToken cancellationToken = default)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `source` | `AnalyticsSource` | No | Source data or object as described by the parameter type. |
| `request` | `DataRequest?` | Yes | Value matching request's declared type and the owning object's validation rules. |
| `options` | `DataQueryOptions?` | Yes | Supported settings for this operation; omitted settings retain documented defaults. |
| `cancellationToken` | `CancellationToken` | Yes | Cancels waiting or execution as supported by this operation. |

### Return Value

`Task<DataSnapshot>`.

### Examples

Refresh a direct analytics source from bounded HTTP sales data without filling worksheet cells. Supply an application-owned HttpClient and service URL; scope cached data to its actual audience.

```csharp
using System.Net.Http;
using TXTextControl.TXSheetControl.Data;
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> BuildWorkbookDataBindingRefreshDashboardAsync(ServerSheetControl control, HttpClient client, Uri serviceBase)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var source = new HttpDataSource(client, request => new HttpRequestMessage(HttpMethod.Get, new Uri(serviceBase, "sales?offset=" + request.Offset + "&limit=" + request.Limit)), ["Region", "Revenue"]);
    var registry = new DataSourceRegistry();
    registry.Register("sales-service", "regional-sales", source);

    var request = new DataRequest { Offset = 0, Limit = 100, Parameters = new Dictionary<string, object?> { ["year"] = 2026 } };
    var options = new DataQueryOptions { Timeout = TimeSpan.FromSeconds(15), CacheDuration = TimeSpan.FromMinutes(1), CacheScope = "public-regional-sales" };
    using var binding = new WorkbookDataBinding(book, registry);
    await binding.RefreshDashboardAsync(new AnalyticsSource
    {
        Id = "regional-sales",
        Name = "Regional sales",
        ConnectionId = "sales-service",
        QueryId = "regional-sales"
    }, request, options);
    // Native format retains the logical source binding; provider credentials stay on the server.
    return await control.SaveAsync(StreamType.InternalWorkbookFormat);
}
```

### 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

- [WorkbookDataBinding Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/workbookdatabinding/llms-full.txt)
- [Creating Dashboards](https://docs.textcontrol.com/tx-sheet-control/dashboards/creating/llms-full.txt)
- [AnalyticsSource Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/analyticssource/llms-full.txt)
- [DataQueryOptions Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/dataqueryoptions/llms-full.txt)
- [DataRequest Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/datarequest/llms-full.txt)
- [DataSnapshot Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/datasnapshot/llms-full.txt)

---

## Nearby

- **Previous:** [WorkbookDataBinding.Dispose Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/workbookdatabinding/dispose-method/llms-full.txt)
- **Next:** [WorkbookDataBinding.RefreshRangeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-data/workbookdatabinding/refreshrangeasync-method/llms-full.txt)
