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

Filterable="true" causing Object reference not set to an instance of an object

8 Answers 1889 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 10 Jul 2019, 07:04 PM

Everything is working fine in my Grid, except the Filterable="true".

When I set the property to true, the grid throws an exception: 

Object reference not set to an instance of an object.
   at Telerik.Blazor.Components.TelerikRootComponentFragmentBase.OnInitAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

 

Any help?

8 Answers, 1 is accepted

Sort by
0
Alexandre
Top achievements
Rank 1
answered on 10 Jul 2019, 07:06 PM
<TelerikGrid Data="@Usuarios?.Resultado" Height="90%" Filterable="true">
    <TelerikGridEvents>
        <EventsManager OnRead=@PopulaUsuarios></EventsManager>
    </TelerikGridEvents>
    <TelerikGridColumns>
        <TelerikGridColumn Field="@(nameof(UsuarioReadModel.Nome))" Title="Nome do usuário" Filterable="true" />
        
    </TelerikGridColumns>
</TelerikGrid>
0
Marin Bratanov
Telerik team
answered on 11 Jul 2019, 07:34 AM
Hi Alexandre,

This exception means that the TelerikRootComponent is not added to the root of the layout as described in the second snippet here: https://docs.telerik.com/blazor-ui/getting-started/what-you-need#project-configuration. For our next version the exception will be more meaningful.


Regards,
Marin Bratanov
Progress Telerik UI for Blazor
0
Medhanie
Top achievements
Rank 1
Veteran
answered on 18 Dec 2019, 08:51 PM

Hi Marin

I also have similar problem, when I add FilterMode="Telerik.Blazor.GridFilterMode.FilterMenu" parameter to my Grid

System.NullReferenceException: Object reference not set to an instance of an object.

  at Telerik.Blazor.Components.RootComponent.TelerikRootComponentFragmentBase.Dispose()

 

I couldn't understand what the error mean.

Any help would be appreciated. 

0
Marin Bratanov
Telerik team
answered on 19 Dec 2019, 02:17 PM

Hi Medhanie,

This is the first time we get such a report. Can you confirm that you are using the latest version (2.5.1 at the time of writing, and .NET Core 3.1)? If yes, could you open a support ticket and send a runnable sample that showcases this issue so I can investigate?

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
0
Medhanie
Top achievements
Rank 1
Veteran
answered on 19 Dec 2019, 04:16 PM

Hi Marin;

Yes I am using latest version but trail one.

I'm using Telerik.UI.for.Blezor.Trial (2.5.1) with Core 3.1.0

As you said, I have already created a new ticket, hopping to get some suggestions there.

Thank you

0
Marin Bratanov
Telerik team
answered on 19 Dec 2019, 05:15 PM

Here is a link to the new thread, because it is a public forum https://www.telerik.com/forums/filtermode=-telerik-blazor-gridfiltermode-filtermenu-getting-me-object-reference-not-set-to-an-instance-of-an-object

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
0
Mythri
Top achievements
Rank 1
answered on 06 Aug 2020, 05:16 PM

NullReferenceException: Object reference not set to an instance of an object.
Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.GetFilterOperators()

 

 

I am gtting this on clicking the filter icon in grid. What might be the issue?

0
Marin Bratanov
Telerik team
answered on 07 Aug 2020, 11:05 AM

Hello Mythri,

My best guess is that the type of the field for this column is not supported (see more here) - e.g., it is a collection of sorts (List, Dictionary), or a complex object (another model). I'd suggest you open a ticket and send us a simple repro we can run and debug - the grid markup and a basic model that shows the problem would usually suffice.

 

Regards,
Marin Bratanov
Progress Telerik

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