Completed
Last Updated: 09 Aug 2024 08:46 by ADMIN
Release 6.1.0
Hendrik
Created on: 11 Jun 2024 08:11
Category: Grid
Type: Bug Report
13
[Regression] Filterable Grid throws if a column field is not bound to a field from the model

In a filterable Grid, if a column is not bound to a field from the model the Grid uses, it throws with:

Error: System.ArgumentNullException: Value cannot be null. (Parameter 'nullableType')

Reproduction: https://blazorrepl.telerik.com/GyEUlFEs04AUJoJ601.

The issue is reproducible :

  • For `FilterRow` -  on initialization even if the column is not filterable.
  • For `FilterMenu` - on initialization when the column is filterable.

===

ADMIN EDIT

===

A possible workaround for the time being is to set the FieldType of the column: https://blazorrepl.telerik.com/wSugvFui10jhcpZy00.


6 comments
ADMIN
Dimo
Posted on: 09 Aug 2024 08:46

Hi Mike,

I confirm that the bug was fixed for the TreeList too. Here is a test page: https://blazorrepl.telerik.com/cyYCutaW43pc6IEb34

Please make sure the column has Filterable="false" and the app is actually using the latest version.

Regards,
Dimo
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

Mike
Posted on: 08 Aug 2024 22:31
This problem also occurs in TreeList, which inherits TableGridBase, but was not addressed in the 6.1.0 release.
Aldo
Posted on: 04 Jul 2024 21:35

@Dimo

Before we upgrade to v6 it was perfectly working.

Amanullah
Posted on: 04 Jul 2024 10:58
Hi, 

We tried to set Filterable = "true" for a column field that is not bound to a field from the model and getting "An unhandled error has occurred.Reload". 
We are using following example: https://blazorrepl.telerik.com/wSugvFui10jhcpZy00
ADMIN
Dimo
Posted on: 03 Jul 2024 07:30

@Aldo

A Field configuration like @nameof(RequestListItem.M136.APMcsfirma) is invalid. It assumes that RequestListItem has a property APMcsfirma, which is not true. Please check the KB article about binding to nested (navigation) properties.

Aldo
Posted on: 26 Jun 2024 21:22

Hi, we have the same problem with columns bound to a subfield from the model.

RequestListItem is my model that has its fields, one of these is an object (M136) with fields

So, this works
<GridColumn Field="@nameof(RequestListItem.Field)"

This raise an exception even with the workaround (FieldType) 

<GridColumn Field="@nameof(RequestListItem.M136.APMcsfirma)" FieldType="@typeof(string)" 

The grid is showed but fields value is always null and if I click on column header to sort I get

Error: System.ArgumentException: Invalid property or field - 'APMcsfirma' for type: RequestListItem
   at Telerik.DataSource.Expressions.MemberAccessTokenExtensions.CreateMemberAccessExpression(IMemberAccessToken token, Expression instance)
   at Telerik.DataSource.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName)
   at Telerik.DataSource.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName, Boolean liftMemberAccessToNull)
   at Telerik.DataSource.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpression()
   at Telerik.DataSource.Expressions.MemberAccessExpressionBuilderBase.CreateLambdaExpression()
   at Telerik.DataSource.SortDescriptorCollectionExpressionBuilder.Sort()
   at Telerik.DataSource.Extensions.QueryableExtensions.Sort(IQueryable source, IEnumerable`1 sortDescriptors)
   at Telerik.DataSource.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, Func`2 selector)
   at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable queryable, DataSourceRequest request)
   at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult(IEnumerable enumerable, DataSourceRequest request)
   at Telerik.Blazor.Data.TelerikDataSourceBase.ProcessData(IEnumerable data)
   at Telerik.Blazor.Components.Common.DataBoundComponent`1.ProcessDataInternal()
   at Telerik.Blazor.Components.TelerikGrid`1.ProcessDataInternal()
   at Telerik.Blazor.Components.Common.DataBoundComponent`1.ProcessDataAsync()
   at Telerik.Blazor.Components.TelerikGrid`1.DataBoundProcessData()
   at Telerik.Blazor.Components.TelerikGrid`1.ProcessDataAsync()
   at Telerik.Blazor.Components.Common.TableGridBase`2.Sort(SortDescriptor sort)
   at Telerik.Blazor.Components.Common.TableGridBase`2.ExecuteSortCommandAsync(TableCommandEventArgs args)
   at Telerik.Blazor.Components.Common.TableGridBase`2.ExecuteValidatedCommand(TableCommandEventArgs args)
   at Telerik.Blazor.Components.TelerikGrid`1.ExecuteValidatedCommand(TableCommandEventArgs args)
   at Telerik.Blazor.Components.Common.TableGridBase`2.ExecuteCommand(Object commandArgs)
   at Telerik.Blazor.Components.Common.Grid.Cells.TableNavigableCellBase`4.ExecuteCommandAsync(TableCommandEventArgs args)
   at Telerik.Blazor.Components.Common.Grid.Cells.TableHeaderCellBase`4.ToggleSortAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)