I'm trying to implement custom filtering. I need to be the one who applies the new filter options to the underlying IEnumerable/IQueryable, as I have to apply certain column filters specially for the data source.
I can't figure out how I can be made responsible for returning the IQueryable that the RadGridView ultimately uses. i'd sort of expect an event like Filtering to have a return object on the EventArgs, for me to pass the IEnumerable back to it.
I'm also completely at a loss as to how to integrate this into the DataPager. Once again, I need to be responsible for implementing the page count retrieval.
Update: I think I can do it by implementing a custom QueryProvider and IQueryable, and parsing what Telerik applies to it into my own form. This sounds hard, though. =/
It's complicated by the fact that my data model doesn't actually have real members for the things I want to query by. I sort of would rather pass them around as text keys.
For example. I'm showing a list of Person objects. Person objects have a collection of Name objects. Only one of which is the "active name." I want the First Name column's filter to be handled by formulating some custom SQL that joins to Name, eliminates all by the current one, and filters that one's FirstName property. I can easily write this code, but I can't figure out how to grab the FilterDescriptor of the FirstName column and actually apply it to the result set the RadGridView AND pager use.
I can't figure out how I can be made responsible for returning the IQueryable that the RadGridView ultimately uses. i'd sort of expect an event like Filtering to have a return object on the EventArgs, for me to pass the IEnumerable back to it.
I'm also completely at a loss as to how to integrate this into the DataPager. Once again, I need to be responsible for implementing the page count retrieval.
Update: I think I can do it by implementing a custom QueryProvider and IQueryable, and parsing what Telerik applies to it into my own form. This sounds hard, though. =/
It's complicated by the fact that my data model doesn't actually have real members for the things I want to query by. I sort of would rather pass them around as text keys.
For example. I'm showing a list of Person objects. Person objects have a collection of Name objects. Only one of which is the "active name." I want the First Name column's filter to be handled by formulating some custom SQL that joins to Name, eliminates all by the current one, and filters that one's FirstName property. I can easily write this code, but I can't figure out how to grab the FilterDescriptor of the FirstName column and actually apply it to the result set the RadGridView AND pager use.