Hi,
we have a problem with filtering when grid column is binded to the complex type.
Below you can find the makup for the problematic column and DataSource:
columns.Bound(m => m.PaymentMethod.Name).Title("Payment Method").Width(100)
.Filterable(filterable => filterable.Operators(operators => operators.ForString(str => str.Clear().Contains("contains").IsEqualTo("equals"))));
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(true)
.PageSize(20)
.Model(model =>
{
model.Id(id => id.IdPayment);
model.Field(m => m.PaymentMethod).DefaultValue(new PaymentMethodViewModel());
model.Field(m => m.PaymentStatus).DefaultValue(new PaymentStatusViewModel());
})
.Read(read => read.Action("Read", "Payments"))
.Create(create => create.Action("Create", "Payments"))
.Update(update => update.Action("Update", "Payments"))
.Destroy(destroy => destroy.Action("Delete", "Payments"))
)
When we filter for the first time everything works OK, the correct set of data is returned.
But something breaks the filter button. When we clik the filter button for the second time, filter menu window doesn't show up and there is a JS error in console:
Błąd mapy źródła: TypeError: this.worker is null
URL zasobu: null
URL mapy źródła: null
[Więcej informacji]
Error: Syntax error, unrecognized expression: [data-field=PaymentMethod.Name]
Does Grid for Asp.Net Core supports filtering on complex types?