1

I'm new to .Net programming. I'm doing an ant blazor project. I have a table and I want to filter and sort rows. According to documentation, it can be done by adding Filterable (for filtering) and Sortable (for sorting) attributes to the column like this

 <Column TData="Guid" @bind-Field="context.Id" Sortable Filterable />

But it gives me the following error

InvalidOperationException: Object of type 'AntDesign.Column`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' does not have a property matching the name 'Sortable'.

Any Solution ??

Hirusha Fernando
  • 1,156
  • 10
  • 29

1 Answers1

0

I have no problem using Filterable and Sortable like above except I don't use my own custom data type. I believe the issue is Ant Blazor doesn't know how to sort/filter Guid. Ant Blazor knows how to sort the default data types such as string, int, bool, etc. Try changing your TData to Int (and convert your actual data content type accordingly).

bobt
  • 411
  • 3
  • 8