# How to Focus on a cell in a spread sheet

**URL:** <https://forum.radzen.com/t/how-to-focus-on-a-cell-in-a-spread-sheet/21752>\
**Category:** Radzen.Blazor Components\
**Created:** [October 26, 2026, 10:20am UTC](https://forum.radzen.com/t/how-to-focus-on-a-cell-in-a-spread-sheet/21752 "2026-10-26T10:20:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferose](https://forum.radzen.com/user_avatar/forum.radzen.com/ferose/32/21908_2.png) [@Ferose](https://forum.radzen.com/u/Ferose)\
**Post date:** [October 26, 2026, 10:20am UTC](https://forum.radzen.com/t/how-to-focus-on-a-cell-in-a-spread-sheet/21752/1 "2026-10-26T10:20:35Z")

</div>

I am trying to set focus on a specific Cell in the active sheet using spread Spreadsheet component and documents APIs. However I can not find any method to do this.

I would like to scroll to cell if it is out of site.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 26, 2026, 10:36am UTC](https://forum.radzen.com/t/how-to-focus-on-a-cell-in-a-spread-sheet/21752/2 "2026-10-26T10:36:22Z")

</div>

There is no single `FocusCell` method, but you can do it in three steps with the existing APIs:

1. Select the cell through the document model, via the worksheet's `Selection`.
2. Scroll it into view with `RadzenSpreadsheet.ScrollToAsync`.
3. Focus the component so keyboard navigation continues from that cell.

```razor
<RadzenButton Text="Go to Z150" Click=@GoToCell />

<RadzenSpreadsheet @ref=@spreadsheet Workbook=@workbook Style="height: 400px" />

@code {
    RadzenSpreadsheet spreadsheet;
    Workbook workbook = new Workbook();

    async Task GoToCell()
    {
        var sheet = workbook.Sheets[spreadsheet.SelectedSheetIndex];
        var cell = CellRef.Parse("Z150");

        sheet.Selection.Select(cell);
        await spreadsheet.ScrollToAsync(cell);
        await spreadsheet.Element.FocusAsync();
    }
}

```

`Selection.Select` moves the active cell and the selection outline. `ScrollToAsync` only scrolls if the cell is outside the visible area, and it accounts for frozen rows and columns. `Element.FocusAsync()` puts keyboard focus on the spreadsheet, so pressing an arrow key afterwards moves from Z150.

You can also use `new CellRef(row, column)` with zero-based indices instead of `CellRef.Parse`, and `Selection.Select(RangeRef.Parse("B2:D5"))` to select a range.

---

<div class="post-metadata">

**Author:** ![Ferose](https://forum.radzen.com/user_avatar/forum.radzen.com/ferose/32/21908_2.png) [@Ferose](https://forum.radzen.com/u/Ferose)\
**Post date:** [October 27, 2026, 9:51am UTC](https://forum.radzen.com/t/how-to-focus-on-a-cell-in-a-spread-sheet/21752/3 "2026-10-27T09:51:17Z")

</div>

Thanks that works. Only other thing you have to do first is change to the required sheet first by setting selectedSheetIndex.

```auto
<RadzenSpreadsheet @ref="spreadsheet" Workbook=@workbook @bind-SelectedSheetIndex=@selectedSheetIndex Style ="height:80vh;width:100%;" />

```
