jQWidgets Forums
jQuery UI Widgets › Forums › ASP .NET MVC › Server side Blazor issues
Tagged: blazor components
This topic contains 3 replies, has 2 voices, and was last updated by admin 4 years, 9 months ago.
-
Author
-
I downloaded JQWidgets to evaluate for Blazor applications. A small sample I put together fails at runtime with the error:
Unable to cast object of type ‘Microsoft.AspNetCore.Blazor.Server.Circuits.RemoteJSRuntime’ to type ‘Microsoft.JSInterop.IJSInProcessRuntime’
when attempting to construct and initialize the <JqxTree .. /> component on a Razor page.
Searching indicates that is happening because something is acting as though it were in a Client side Blazor project rather than a Server one.
The page at https://www.jqwidgets.com/jquery-widgets-documentation/documentation/asp-net-blazor/asp-net-blazor.htm gives an example of using a widget in a Server side context, and it entails some tedious Javascript construction and using divs rather than the usual Blazor oriented tags.
Is that in fact how JQWidgets has to be used currently in Server side Blazor apps, or is there a way to use it with normal tags and C# setup?
Hi,
The doc topic you’re pointing out is using Javascript widgets with Blazor. To get started with our Blazor components, you may take a look at: https://blazor.jqwidgets.com/documentation/
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/The page you point to states:
“Prerequisites
.NET Core SDK – This includes everything you need to build and run Blazor WebAssembly apps.”and the rest proceeds along the same lines. The problem is that “Blazor WebAssembly” = Blazor Client side apps. As I indicated above, I (and many others) are using Server side Blazor. So I’m left with the same question:
“Is that in fact how JQWidgets has to be used currently in Server side Blazor apps, or is there a way to use it with normal tags and C# setup?”
Hi,
1. For using Blazor with WebAssembly, you can use our new Blazor components: https://blazor.jqwidgets.com/. In the first release, server side hosting is not implemented.
2. For using Blazor with Server Side hosting, you can use our Javascript components: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/asp-net-blazor/asp-net-blazor.htm
Hope this answers your question.
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.