I started a default Blazor Web App project (.NET 8.0) in Visual Studio 2022.
I followed the page FluentUI Code Setup for manually setup the component Library
What I want is when I Click a row in a Grid that I can navigate/show a detailpage. The OnRowFocus Callback is never triggered.
💻 Repro or Code Sample
@page "/"
<PageTitle>Home</PageTitle>
<FluentDataGrid Virtualize="false" ItemSize="120" OnRowFocus="HandleRowClick" TGridItem="Person" ItemsProvider="PeopleData">
<PropertyColumn Property="@(p => p.PersonId)" Sortable="true" />
<PropertyColumn Property="@(p => p.Name)" Sortable="true" />
<PropertyColumn Property="@(p => p.BirthDate)" Format="yyyy-MM-dd" Sortable="true" />
</FluentDataGrid>
@code{
record Person(int PersonId, string Name, DateOnly BirthDate);
List<Person> people =
[
new Person(10895, "Jean Martin", new DateOnly(1985, 3, 16)),
new Person(10944, "António Langa", new DateOnly(1991, 12, 1)),
new Person(11203, "Julie Smith", new DateOnly(1958, 10, 10)),
new Person(11205, "Nur Sari", new DateOnly(1922, 4, 27)),
new Person(11898, "Jose Hernandez", new DateOnly(2011, 5, 3)),
new Person(12130, "Kenji Sato", new DateOnly(2004, 1, 9))
];
GridItemsProvider<Person>? PeopleData;
protected override Task OnInitializedAsync()
{
PeopleData = async req => GridItemsProviderResult.From(
items: people,
totalItemCount: people.Count());
return Task.CompletedTask;
}
private void HandleRowClick(FluentDataGridRow<Person> obj)
{
Console.WriteLine("Clicked!!");
}
}
🤔 Expected Behavior
Console Writeline with message Clicked!
😯 Current Behavior
OnRowFocus not triggered
🔦 Context
After selecting a row I want to load an another page with detailed information
🌍 Your Environment
OS & Device: Windows 10 Enterprise
Browser: Microsoft Edge, Google Chrome
.NET and Fluent UI Blazor library Version: .NET 8.0, 4.7.2
🐛 Bug Report
I started a default Blazor Web App project (.NET 8.0) in Visual Studio 2022. I followed the page FluentUI Code Setup for manually setup the component Library
What I want is when I Click a row in a Grid that I can navigate/show a detailpage. The OnRowFocus Callback is never triggered.
💻 Repro or Code Sample
@page "/"
🤔 Expected Behavior
Console Writeline with message Clicked!
😯 Current Behavior
OnRowFocus not triggered
🔦 Context
After selecting a row I want to load an another page with detailed information
🌍 Your Environment