C
C#2w ago
Mango

MudBlazor exception with MudDataGrid

Getting the following exception when trying out MudDataGrid component
System.InvalidOperationException: Cannot provide a value for property 'EventListener' on type 'MudBlazor.MudDataGrid`1[[BlazorVsaTemplate.Features.Weather.WeatherForecast, BlazorVsaTemplate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. There is no registered service of type 'MudBlazor.IEventListener'.
at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass9_0.<CreatePropertyInjector>g__Initialize|1(IServiceProvider serviceProvider, IComponent component)
at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType, IComponentRenderMode callerSpecifiedRenderMode, Nullable`1 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|54_0()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
System.InvalidOperationException: Cannot provide a value for property 'EventListener' on type 'MudBlazor.MudDataGrid`1[[BlazorVsaTemplate.Features.Weather.WeatherForecast, BlazorVsaTemplate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. There is no registered service of type 'MudBlazor.IEventListener'.
at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass9_0.<CreatePropertyInjector>g__Initialize|1(IServiceProvider serviceProvider, IComponent component)
at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType, IComponentRenderMode callerSpecifiedRenderMode, Nullable`1 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|54_0()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
I've tried all the steps here: https://blazorstrap.io/V5/V5 as answered in https://stackoverflow.com/questions/70667806/blazor-unhandled-exception-cannot-provide-a-value-for-property-blazorstrapsrc
Stack Overflow
Blazor unhandled exception: Cannot provide a value for property 'Bl...
I am using VS 2022 and created a Blazor WebAssembly ASP.NET Core hosted project. I want to implement an image slider on my Index.razor and tried to use BlazorStrap. This is the code I am using: @us...
5 Replies
exixt
exixt2w ago
hmm what's BlazorVsaTemplate? looks more like mudblazor isn't fully configured, never seen that exception and I use MudDataGrid frequently
exixt
exixt2w ago
MudBlazor
MudBlazor - Blazor Component Library
Blazor Component Library based on Material Design. MudBlazor is easy to use and extend, especially for .NET devs because it uses almost no Javascript.
exixt
exixt2w ago
now if you don't use server, global interactive you may run into issues regardless. the different render modes are a mess, and instead what will work out of the box without messing around is global server interactive please start from their template provided if you just want to test and play around, not some bogus other blazor templates
Mango
Mango2w ago
BlazorVsaTemplate is the root namespace of my app it is Blazor server
exixt
exixt2w ago
haha shit I'm tired, of course. ask in mudblazor discord if you're really stuck, but looks like somethings missing
Want results from more Discord servers?
Add your server
More Posts
Source generator WithAttributeMetadataName transform function not get invokeHi, first time on C# here. I try to generate a partial class for any class that annotate with attrVisual Studio CodeHi everyone. I have a question. I have installed on my PC visual studio code and I wanted to write aHow to handle outputs that alter the same line and remove lines while running a process?Hello, I am trying to run a process in a C# program and the process output alters on the same line. Application closing without any errors when uploading a pictureHey guy's i've been getting this error lately which is kind of weird tbh i've made an input to uploaHiding Encryption key from REHi, I made an application in C#, most of the strings are encrypted with AES and are in C++ DLL. what URL should Kestrel listen to in a docker container on Azure App ServiceI have an ASP.NET Core in a docker container that will be hosted on Azure App Service. What URL shouASP.Net WebForm application is becoming slower after precompiling it in AzureHello everyone, Recently we deployed a precompiled ASP.Net Webform application in Azure App ServiceNeed help with video processingI wanna display a video in opentk. Anyone know how to do that?Help with coding a JSON file-based framework for extending features in a Unity modIn my current project I want other modders to be able to add their own features via JSON files in a Making my functions more genericright now i have several functions that do essentially the same thing, the only difference being the