Library Blazor Components NextGrid Reference Classes NextGrid Properties SelectedItem

SelectedItem

References currently selected (if any) item inside grid.

razor
[Parameter]
public T? SelectedItem { get; set; }

Examples

The following example shows how two-way binding can be utilized for this property:

razor
<DataGrid T="Product" @bind-SelectedItem="@SelectedProduct" ItemsSource="Products">
</DataGrid>

@code {
    public Product? SelectedProduct { get; set; }
}

Sign in