dotnet / DataGridExtensions

Modular extensions for the WPF DataGrid control
MIT License
791 stars 100 forks source link

Paging #5

Open cilerler opened 6 years ago

cilerler commented 6 years ago

Would you please add an example of how to combine filtering and paging?

tom-englert commented 6 years ago

If you need paging, you have to do server side filtering.

I think you will have to implement your own ICollectionView and pass the filters to the server.

cilerler commented 6 years ago

I have a oData service that I'm trying to consume via datagrid. So if I didn't miss understood you, you are saying that I have to implement middleware in between. Please confirm.

tom-englert commented 6 years ago

Yes, however I'm not sure if that will work. E.g. ICollectionView.Filter is a simple Predicate<object>, not an expression, so I have no idea how that could be passed to a server. Maybe the DGX would need to be aware of this scenario, so it can pass an expression instead of a compiled function...

cilerler commented 6 years ago

Thanks

bytefish commented 1 month ago

I am late to the game, but I leave it here in case someone comes across this issue. I have added an example for working with an OData Service with a WPF DataGrid at:

@tom-englert Thanks for this great library!