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

FilterMode="Telerik.Blazor.GridFilterMode.FilterMenu" getting me Object reference not set to an instance of an object

3 Answers 726 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Medhanie
Top achievements
Rank 1
Veteran
Medhanie asked on 19 Dec 2019, 04:13 PM

Adding FilterMode to TelerikGrid is not working for me, it is returning Null reference exception, I don't understand what it means.

<TelerikGrid Data=@Grid FilterMode="Telerik.Blazor.GridFilterMode.FilterMenu" Pageable=true>

 

An unhandled exception occurred while processing the request.
System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Blazor.Components.RootComponent.TelerikRootComponentFragmentBase.Dispose()

at Microsoft.AspNetCore.Components.Rendering.ComponentState.Dispose()

at Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose(Boolean disposing)

--- End of stack trace from previous location where exception was thrown ---

 

Thank you in advance for your help

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Dec 2019, 05:17 PM

Hi,

With the available information I can only suggest you compare against our demos that work fine: https://demos.telerik.com/blazor-ui/grid/filter-menu.

If this does not help I suggest you open a support ticket where you can send a zipped project so I can investigate and avoid further guesswork.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
0
Accepted
Marin Bratanov
Telerik team
answered on 19 Dec 2019, 06:56 PM

To add the information from the sample from the ticket here as well - the project was missing the required bits that enable the Telerik components. You can see what you need in this article or in this tutorial

--Marin

0
Medhanie
Top achievements
Rank 1
Veteran
answered on 19 Dec 2019, 07:49 PM

Thank you

I was missing to add @using statements in the Imports file to add Blazor.Components files and include <TelerikRootComponent> inside MainLayout.

Problem is now fixed.

thank you

Tags
Grid
Asked by
Medhanie
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Medhanie
Top achievements
Rank 1
Veteran
Share this question
or