# SelectionChangedEventArgs Class

> SelectionChangedEventArgs class in the .NET API: Detached screen selection whose A1 addresses identify the active and extended cells on SheetId.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Blazor`
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Blazor.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Implements:** `System.IEquatable<TXTextControl.TXSheetControl.Blazor.SelectionChangedEventArgs>`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Blazor > SelectionChangedEventArgs Class
- **793 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/llms-full.txt

---

Detached screen selection. A1 addresses identify the active and extended cells on SheetId.

### Syntax

```csharp
public class SelectionChangedEventArgs
```

### Members

| Member | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/constructor/llms-full.txt) | Creates SelectionChangedEventArgs settings or event data for the component. |
| [Active](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/active-property/llms-full.txt) | A1 address of the active cell. |
| [Anchor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/anchor-property/llms-full.txt) | A1 address where selection extension started. |
| [FirstColumn](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/firstcolumn-property/llms-full.txt) | First zero-based column. |
| [FirstRow](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/firstrow-property/llms-full.txt) | First zero-based row. |
| [Focus](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/focus-property/llms-full.txt) | A1 address where selection extension ends. |
| [Kind](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/kind-property/llms-full.txt) | Selection kind: cells, rows or columns. |
| [LastColumn](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/lastcolumn-property/llms-full.txt) | Last zero-based column. |
| [LastRow](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/lastrow-property/llms-full.txt) | Last zero-based row. |
| [SheetId](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/sheetid-property/llms-full.txt) | Worksheet identity. |

### Examples

```csharp
private string selectionLabel = "";
private void OnSelection(SelectionChangedEventArgs args)
{
    selectionLabel = $"{args.Kind}: {args.Active}, {args.Anchor} to {args.Focus} on {args.SheetId}";
    int rows = args.LastRow - args.FirstRow + 1;
    int columns = args.LastColumn - args.FirstColumn + 1;
    selectionLabel += $" ({rows} rows, {columns} columns)";
}
```

### Remarks

Use the component only after interactive rendering. Browser document operations execute in the editor through JavaScript interop. Completed notifications cannot synchronously cancel edits.

### See Also

- [Blazor Tutorial](https://docs.textcontrol.com/tx-sheet-control/getting-started/spreadsheet-editor/blazor/llms-full.txt).

---

## In This Section

- [SelectionChangedEventArgs.Active Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/active-property/llms-full.txt): SelectionChangedEventArgs.Active property in the TX Sheet Control .NET API: A1 address of the active cell in a detached Blazor selection snapshot.
- [SelectionChangedEventArgs.Anchor Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/anchor-property/llms-full.txt): SelectionChangedEventArgs.Anchor property in the TX Sheet Control .NET API: A1 address where selection extension started.
- [SelectionChangedEventArgs Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/constructor/llms-full.txt): SelectionChangedEventArgs constructor in the .NET API: Creates a detached selection description with worksheet identity and zero-based row and column bounds.
- [SelectionChangedEventArgs.FirstColumn Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/firstcolumn-property/llms-full.txt): SelectionChangedEventArgs.FirstColumn property in the TX Sheet Control .NET API: First zero-based column of the selection, as an int in a detached snapshot.
- [SelectionChangedEventArgs.FirstRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/firstrow-property/llms-full.txt): SelectionChangedEventArgs.FirstRow property in the TX Sheet Control .NET API: First zero-based row of the selection, as an int in a detached snapshot.
- [SelectionChangedEventArgs.Focus Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/focus-property/llms-full.txt): SelectionChangedEventArgs.Focus property in the TX Sheet Control .NET API: A1 address where selection extension ends, as a string in a detached snapshot.
- [SelectionChangedEventArgs.Kind Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/kind-property/llms-full.txt): SelectionChangedEventArgs.Kind property in the TX Sheet Control .NET API: Selection kind, cells, rows or columns, as a string in a detached Blazor snapshot.
- [SelectionChangedEventArgs.LastColumn Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/lastcolumn-property/llms-full.txt): SelectionChangedEventArgs.LastColumn property in the TX Sheet Control .NET API: Last zero-based column of the selection, as an int in a detached snapshot.
- [SelectionChangedEventArgs.LastRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/lastrow-property/llms-full.txt): SelectionChangedEventArgs.LastRow property in the TX Sheet Control .NET API: Last zero-based row of the selection, as an int in a detached snapshot.
- [SelectionChangedEventArgs.SheetId Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/sheetid-property/llms-full.txt): SelectionChangedEventArgs.SheetId property in the TX Sheet Control .NET API: Identity of the worksheet on which the selection's A1 addresses apply.

---

## Nearby

- **Previous:** [RibbonOptions.Tabs Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/ribbonoptions/tabs-property/llms-full.txt)
- **Next:** [SelectionChangedEventArgs Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/selectionchangedeventargs/constructor/llms-full.txt)
