IQueryable.Where does not accept LoadDataArgs.Filter

In my WebAssembly project I have bound a DataGrid do an IList which has been working fine, but I would prefer to use virtualization instead of paging. The example datagrid-virtualization-loaddata looks straight forward, but for me it does not compile. Is it because I don't have the data in a DbContext? How could I resolve that?

public IList<TItem> Rows { get; private set; }
public async void LoadData(LoadDataArgs args)
{
		var query = Rows.AsQueryable();
		if (!string.IsNullOrEmpty(args.Filter))
		{
			query = query.Where(args.Filter);
		}

|Error|CS1503|Argument 2: cannot convert from 'string' to 'System.Func<TItem, bool>'

You need @using System.Linq.Dynamic.Core

1 Like

Thanks! Quite simple when you know it. Just a follow-up question: Does in-line editing work with virtualization?

Btw, the example code in datagrid-virtualization-loaddata says

        orderDetails = query.Skip(args.Skip.Value).Take(args.Top.Value).ToList();
        count = dbContext.OrderDetails.Count();

But it would be nicer to have count = query.Count();