Error when selecting grid rows.
I get the following error when I select a grid row.
<SfGrid DataSource="@Tags">
<GridColumns>
<GridColumn Field=@nameof(Tag.Name) HeaderText="Name" Width="120"></GridColumn>
<GridColumn Field=@nameof(Tag.RelatedTo) HeaderText="Doc Type" Width="120"></GridColumn>
<GridColumn Field=@nameof(Tag.PageNumber) HeaderText="Page" Width="120"></GridColumn>
</GridColumns>
</SfGrid>
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find 'Grid' in 'window.sfBlazor'.
Error: Could not find 'Grid' in 'window.sfBlazor'.
at https://localhost:44309/_framework/blazor.webassembly.js:1:9130
at Array.forEach ()
at p (https://localhost:44309/_framework/blazor.webassembly.js:1:9090)
at https://localhost:44309/_framework/blazor.webassembly.js:1:9800
at new Promise ()
at Object.beginInvokeJSFromDotNet (https://localhost:44309/_framework/blazor.webassembly.js:1:9773)
at _mono_wasm_invoke_js_marshalled (https://localhost:44309/_framework/wasm/dotnet.3.2.0.js:1:171294)
at do_icall (https://localhost:44309/_framework/wasm/dotnet.wasm:wasm-function[6049]:0x10f8b1)
at do_icall_wrapper (https://localhost:44309/_framework/wasm/dotnet.wasm:wasm-function[1896]:0x50b6a)
at interp_exec_method (https://localhost:44309/_framework/wasm/dotnet.wasm:wasm-function[1120]:0x2588e)
Microsoft.JSInterop.JSException: Could not find 'Grid' in 'window.sfBlazor'.
Error: Could not find 'Grid' in 'window.sfBlazor'.
at https://localhost:44309/_framework/blazor.webassembly.js:1:9130
at Array.forEach ()
at p (https://localhost:44309/_framework/blazor.webassembly.js:1:9090)
at https://localhost:44309/_framework/blazor.webassembly.js:1:9800
at new Promise ()
at Object.beginInvokeJSFromDotNet (https://localhost:44309/_framework/blazor.webassembly.js:1:9773)
at _mono_wasm_invoke_js_marshalled (https://localhost:44309/_framework/wasm/dotnet.3.2.0.js:1:171294)
at do_icall (https://localhost:44309/_framework/wasm/dotnet.wasm:wasm-function[6049]:0x10f8b1)
at do_icall_wrapper (https://localhost:44309/_framework/wasm/dotnet.wasm:wasm-function[1896]:0x50b6a)
at interp_exec_method (https://localhost:44309/_framework/wasm/dotnet.wasm:wasm-function[1120]:0x2588e)
at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x3e17ee8 + 0x00034> in :0
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync (Microsoft.JSInterop.IJSRuntime jsRuntime, System.String identifier, System.Object[] args) <0x3c1ef30 + 0x000e4> in :0
at Syncfusion.Blazor.SfBaseComponent.InvokeMethod (System.String methodName, System.Object[] methodParams) <0x55204b0 + 0x000d6> in :0
at Syncfusion.Blazor.Grids.Internal.FocusHandler`1[T].Focus (System.String rowUid, System.String cellUid, System.String action) <0x632d678 + 0x00114> in :0
at Syncfusion.Blazor.Grids.Internal.FocusHandler`1[T].Refresh (Syncfusion.Blazor.Grids.Internal.Row`1[T] Row, Syncfusion.Blazor.Grids.Internal.Cell`1[T] Cell) <0x632cc48 + 0x0022c> in :0
at Syncfusion.Blazor.Grids.Internal.GridCell`1[TCell].b__0_5 (Microsoft.AspNetCore.Components.Web.MouseEventArgs e) <0x62f4fe0 + 0x001d4> in :0
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x3d91e90 + 0x000da> in :0
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask (System.Threading.Tasks.Task taskToHandle) <0x3d929d8 + 0x000b6> in :0
f.printErr @ blazor.webassembly.js:1
f.preRun.push.window.Blazor._internal.dotNetCriticalError @ blazor.webassembly.js:1
_mono_wasm_invoke_js_unmarshalled @ dotnet.3.2.0.js:1
do_icall @ dotnet.wasm:1
do_icall_wrapper @ dotnet.wasm:1
interp_exec_method @ dotnet.wasm:1
interp_runtime_invoke @ dotnet.wasm:1
mono_jit_runtime_invoke @ dotnet.wasm:1
do_runtime_invoke @ dotnet.wasm:1
mono_runtime_try_invoke @ dotnet.wasm:1
mono_runtime_invoke @ dotnet.wasm:1
mono_wasm_invoke_method @ dotnet.wasm:1
Module._mono_wasm_invoke_method @ dotnet.3.2.0.js:1
call_method @ dotnet.3.2.0.js:1
(anonymous) @ dotnet.3.2.0.js:1
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
_mono_wasm_invoke_js_marshalled @ dotnet.3.2.0.js:1
do_icall @ dotnet.wasm:1
do_icall_wrapper @ dotnet.wasm:1
interp_exec_method @ dotnet.wasm:1
interp_runtime_invoke @ dotnet.wasm:1
mono_jit_runtime_invoke @ dotnet.wasm:1
do_runtime_invoke @ dotnet.wasm:1
mono_runtime_invoke_checked @ dotnet.wasm:1
mono_runtime_try_invoke_array @ dotnet.wasm:1
ves_icall_InternalInvoke @ dotnet.wasm:1
ves_icall_InternalInvoke_raw @ dotnet.wasm:1
do_icall @ dotnet.wasm:1
do_icall_wrapper @ dotnet.wasm:1
interp_exec_method @ dotnet.wasm:1
interp_runtime_invoke @ dotnet.wasm:1
mono_jit_runtime_invoke @ dotnet.wasm:1
do_runtime_invoke @ dotnet.wasm:1
mono_runtime_invoke_checked @ dotnet.wasm:1
mono_runtime_try_invoke_array @ dotnet.wasm:1
ves_icall_InternalInvoke @ dotnet.wasm:1
ves_icall_InternalInvoke_raw @ dotnet.wasm:1
do_icall @ dotnet.wasm:1
do_icall_wrapper @ dotnet.wasm:1
interp_exec_method @ dotnet.wasm:1
interp_runtime_invoke @ dotnet.wasm:1
mono_jit_runtime_invoke @ dotnet.wasm:1
do_runtime_invoke @ dotnet.wasm:1
mono_runtime_try_invoke @ dotnet.wasm:1
mono_runtime_invoke @ dotnet.wasm:1
mono_wasm_invoke_method @ dotnet.wasm:1
Module._mono_wasm_invoke_method @ dotnet.3.2.0.js:1
call_method @ dotnet.3.2.0.js:1
(anonymous) @ dotnet.3.2.0.js:1
beginInvokeDotNetFromJS @ blazor.webassembly.js:1
s @ blazor.webassembly.js:1
e.invokeMethodAsync @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
t.dispatchEvent @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
e.onGlobalEvent @ blazor.webassembly.js:1
Show 29 more frames
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
RN
Rahul Narayanasamy
Syncfusion Team
July 27, 2020 05:37 PM UTC
Hi Michael,
Greetings from Syncfusion.
Query: Error when selecting grid rows..
We have validated your query and checked the reported problem at our end. We may suspect that the problem occurs due to the following cases.
- Due to Browser/NuGet cache.
- Outdated custom scripts referred in the application.
- When setting true to AddSyncfusionBlazor and not added proper interop file in the sample.
- Please ensure your project is getting properly configured or not. Find the below documentation for your reference.
Also, could you please ensure the problem after clearing the browser/NuGet cache or run the application using incognito window of the browser.
If you are still facing the problem, then could you please get back to us with the following details. It will be helpful to validate and provide a better solution.
- Share your Startup.cs file.
- .Net core version details.
- Video demonstration of the problem.
Regards,
Rahul
ML
Michael Lambert
August 3, 2020 06:30 AM UTC
When I updated this line with 'true' in the Program.cs
builder.Services.AddSyncfusionBlazor(true);
and updated everything to 18.2.47 and updated this line index.html, things seem to work now.
<script src="https://cdn.syncfusion.com/blazor/18.2.47/syncfusion-blazor.min.js"></script>
RN
Rahul Narayanasamy
Syncfusion Team
August 4, 2020 03:50 PM UTC
Hi Michael,
Thanks for the update.
Yes, you can refer the external scripts in _Host.cshtml after adding the AddSyncfusionBlazor(true) in Program.cs like you referred. By using this way, we need to externally refer the required scripts.
If we define the AddSyncfusionBlazor() in Program.cs file, then you don’t need to refer external scripts in _Host.cshtml. You can only refer the CSS reference alone.
|
<html lang="en">
<head>
. . .
<link rel='nofollow' href="css/site.css" rel="stylesheet" />
<link rel='nofollow' href="https://cdn.syncfusion.com/blazor/18.2.47/styles/fabric.css" rel="stylesheet" />
</head>
|
If we define the AddSyncfusionBlazor(true) in Program.cs file, then you need to refer external scripts in _Host.cshtml with the CSS reference.
Note: Also, while defining AddSyncfusionBlazor() in Program.cs file, please clear all the NuGet/browser cache and check the reported problem at your end.
Regards,
Rahul
Marked as answer
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
ML Michael Lambert
- Jul 25, 2020 11:00 PM UTC
- Aug 4, 2020 03:50 PM UTC