This is a migrated thread and some comments may be shown as answers.

Grid filter mode causes exception

1 Answer 484 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 24 Oct 2019, 02:16 PM

I am seeing that the grid filter mode causes the following exception to be thrown: "System.InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the component is being prerendered and the page has not yet loaded in the browser or because the circuit is currently disconnected. Components must wrap any JavaScript interop calls in conditional logic to ensure those interop calls are not attempted during prerendering or while the client is disconnected."

Steps to reproduce (project using example from https://docs.telerik.com/blazor-ui/components/grid/overview is at https://github.com/austineric/GridTest):

  1. Open solution
  2. Ctrl + F5
  3. In the address bar add "/test" to the url
  4. In Visual Studio change the output to "GridTest - ASP.NET Core Web Server"
  5. Clear All in the output window
  6. Refresh the browser page
  7. View the exception in the output window
  8. Run the same test but remove the "FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"" and see that the exception does not appear

Error produced using

  • .Net Core 3.0.100
  • Telerik UI for Blazor 2.2.1
  • Visual Studio 16.3.5

The grid appears to be working and filtering correctly despite the exception. Should I disregard? Should I be doing something differently?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 25 Oct 2019, 07:51 AM

Hi Eric, 

The upgrade to .NET Core 3.1 should also include an upgrade to netcoreapp3.1 from netcoreapp3.0 as per the MS blog post (see the "Upgrade an existing project" section): https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-core-3-1-preview-1/.

This removes the exception on my end.

I created a pull request with the fix: https://github.com/austineric/GridTest/pull/1

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Tags
Grid
Asked by
Eric
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or