New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI TreeDataGrid Current Cell

The Telerik UI for .NET MAUI TreeDataGrid provides options for configuring the behavior and style of its current cell.

Setting the Behavior

In the TreeDataGrid, you can use the RadDataGrid.CurrentCell (DataGridCellInfo) property to programmatically modify the current cell during keyboard navigation, when using the mouse, and so on.

By subscribing to the CurrentCellChanged event, you can listen for the changes in the current cell resulting from user interaction with the keyboard.

The CurrentCellChanged event handler receives the following parameters:

  • The sender argument, which is of type object, but can be cast to the RadDataGrid type.
  • A CurrentCellChangedEventArgs object, which provides the following properties:
    • OldCurrentCell—Gets the previous CurrentCell.
    • NewCurrentCell—Gets the new CurrentCell.

Styling the Cell

You can style the current cell by using the CurrentCellStyle property (of type Style with target type DataGridCurrentCellAppearance) and applying the BackgroundColor, BorderColor, and BorderThickness properties.

As the TreeDataGrid inherits from the DataGrid, for a runnable example with the CurrentCell scenario, see the SDKBrowser Demo Application and go to DataGrid > Keyboard Navigation category.

Additional Resources

See Also

In this article