Not only does the DataGrid appears out of nowhere, but the dialog is loaded with an item. It's like the row select event is triggered and the grid is hidden inside the button or something.
Using the debugger, this is the usual working output when accessing the page from another page:
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Information: Authorization was successful.
And this is the output after refreshing the page:
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
Sending file. Request path: '/favicon.ico'. Physical path: 'C:\Files\Repositories\SolidAccessWeb\Code\Front\server\wwwroot\favicon.ico'
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Information: Sending file. Request path: '/favicon.ico'. Physical path: 'C:\Files\Repositories\SolidAccessWeb\Code\Front\server\wwwroot\favicon.ico'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 8.8501ms 200 image/x-icon
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 8.8501ms 200 image/x-icon
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Information: Authorization was successful.
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://127.0.0.1:5002/assets/images/SF_Hori_White.svg
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://127.0.0.1:5002/assets/images/SF_Hori_White.svg
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://127.0.0.1:5002/assets/images/SI_White.svg
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://127.0.0.1:5002/assets/images/SI_White.svg
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[6]
The file /assets/images/SF_Hori_White.svg was not modified
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Information: The file /assets/images/SF_Hori_White.svg was not modified
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Information: The file /assets/images/SI_White.svg was not modified
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[6]
The file /assets/images/SI_White.svg was not modified
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 9.0329ms 304 image/svg+xml
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 9.0329ms 304 image/svg+xml
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 11.7947ms 304 image/svg+xml
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 11.7947ms 304 image/svg+xml
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://127.0.0.1:5002/assets/fonts/MaterialIcons-Regular.woff
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://127.0.0.1:5002/assets/fonts/MaterialIcons-Regular.woff
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[6]
The file /assets/fonts/MaterialIcons-Regular.woff was not modified
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: Information: The file /assets/fonts/MaterialIcons-Regular.woff was not modified
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 6.9428ms 304 application/font-woff
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 6.9428ms 304 application/font-woff
I noticed that in the middle of the refreshing process, an error log quickly appears in the console and disappears right before the new page loads. The log contains this message:
Error: Blazor Circuit has been shut down due to error
Another observation is that sometimes the page refreshes as it should, but that's roughly 20% of the time.
The log is perfectly normal - it shows the StaticFileMiddleware returning static files - fonts, images and icons. The Circuit has been shut down due to error is suspicious though. Something is throwing an exception. Can't tell what though. You can try commenting out components in that page (or setting their Visible property to false) to find which the problematic one is.
UPDATE: Forgot about this one - try configuring your debugger to break on all exceptions. It may at least point out to something closer to the real culprit.
Then it is probably something coming from the layout. Try removing <RadzenNotification />, <RadenDialog/>, <RadzenPanelMenu />. I suspect it could be some of the ones that use a service - dialog, notification, context menu.
UPDATE: forgot to mention the tooltip - try commenting <RadzenToolTip /> from the layout too.
Removing all the components in the layout fixed the error.
Having any Radzen component in the layout will cause this bug. And I mean any, from the RadzenTooltip to the RadzenLabel to the RadzenBody, etc. With raw HTML components, it will work every single time.
I'll be happy to ship my app to you for further investigation. There is a database safe version that I can send it right now.