Hello,
I try to filter my datagrid like this :
The same filter must be used for 2 properties. But an error is raised when I use the Or method, if I remove the Or, it works but it is not what I want to do because, without the Or method, the composant do an And between the two filters.
.
.
.
.Filter(f =>
{
if(!string.IsNullOrEmpty(Model.FilterByVendor))
{
f.Add(a => a.Name).Contains(Model.FilterByVendor).Or();
f.Add(a => a.VendorNumber).Contains(Model.FilterByVendor).Or();
}
})
.Read(read => read.Action("GetAllVendors", "Vendor"))
.PageSize(20)
)
.Filterable()
)
I try to filter my datagrid like this :
The same filter must be used for 2 properties. But an error is raised when I use the Or method, if I remove the Or, it works but it is not what I want to do because, without the Or method, the composant do an And between the two filters.
.
.
.
.Filter(f =>
{
if(!string.IsNullOrEmpty(Model.FilterByVendor))
{
f.Add(a => a.Name).Contains(Model.FilterByVendor).Or();
f.Add(a => a.VendorNumber).Contains(Model.FilterByVendor).Or();
}
})
.Read(read => read.Action("GetAllVendors", "Vendor"))
.PageSize(20)
)
.Filterable()
)