Grid LoadData IQueriable and EntityFramework

Hello, it is possible use LoadData event with IQueryable collection. I have problem with sorting and filtering. I don't know how to use LoadDataEventArgs with entity framework IQueryable.

You can use IQueryable extensions methods like Take(), Skip(), OrderBy and Where and pass LoadDataEventArgs properties as arguments.

Thanks for reply, but i have no idea how I can build Where clause dynamically from arguments. Can you send me example?

Check the updated demo. It shows how to use the event arguments with a Where method which comes from Dynamic Linq.

1 Like

Thank you for providing the demo.

My only question is with regards to the LoadDataArgs.Filter vs LoadDataArgs.Filters properties, as well as the LoadDataArgs.OrderBy vs LoadDataArgs.Sorts properties.

These seem to overlap. Is the intention here to use Filters/OrderBy for Dynamic Linq while the others are for more custom scenarios? That is my impression and wanted to verify.