Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Unhandled exception when filtering Enum column #157

Closed
bryanrcarlson opened this issue Jul 30, 2020 · 2 comments
Closed

Unhandled exception when filtering Enum column #157

bryanrcarlson opened this issue Jul 30, 2020 · 2 comments

Comments

@bryanrcarlson
Copy link

Using version 1.12.0 (downgrading to version 1.11.1 fixed this issue)

When I filter a column with an Enum value (Caf.Midden.Utils.Models.Zones) I get the following error:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: The binary operator NotEqual is not defined for the types 'Caf.Midden.Utils.Models.Zones' and 'System.Object'.
System.InvalidOperationException: The binary operator NotEqual is not defined for the types 'Caf.Midden.Utils.Models.Zones' and 'System.Object'.
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x262b9e8 + 0x000ce> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---

Relevant Razor code:

 <Column TableItem="Dataset" Title="Zone" Field="@(d => d.Zone)" Sortable="true" Filterable="true" Width="5%" />

Great component, btw. Thanks!

@IvanJosipovic
Copy link
Owner

Hey,

Can you please create a page that fully reproduces this issue?
See Example

IvanJosipovic added a commit that referenced this issue Aug 5, 2020
@IvanJosipovic
Copy link
Owner

Thanks for the repro, this issue is fixed in 1.12.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants