Hi,
I am using GridView with an IQueryable datasource, together with the builtin header filters.
But when filtering, it just filters the loaded memory object instead of the database.
I have tried to utilize DynamicLinq, by handling the FilterChanging event like this:
Then in the LoadData method I have to parse the FilterDescriptor expressions, but this would take some time to get it right, and implementing the various filter operators in DynamicLinq. E.g. the "LIKE" operator needs to be rewritten as ColumnName.Contains(filter) etc.
If my memory serves correct I believe that KendoUI MVC have some builtin functionality to handle this type of situation.
Do you have anything similar in the WinForms toolkit ?
Or do you recommend a different approach ?
(Using VS2012, .NET4.5, Toolkit v. 2013.1.321.40)
I am using GridView with an IQueryable datasource, together with the builtin header filters.
But when filtering, it just filters the loaded memory object instead of the database.
I have tried to utilize DynamicLinq, by handling the FilterChanging event like this:
Private
FilterDescriptors
As
New
List(Of FilterDescriptor)
Private
Sub
GridView1_FilterChanging(sender
As
Object
, e
As
Telerik.WinControls.UI.GridViewCollectionChangingEventArgs)
Handles
GridView1.FilterChanging
e.Cancel =
True
For
Each
f
In
e.NewItems.OfType(Of FilterDescriptor)()
FilterDescriptors.Add(f)
Next
LoadData() 'Load data here
End
Sub
Then in the LoadData method I have to parse the FilterDescriptor expressions, but this would take some time to get it right, and implementing the various filter operators in DynamicLinq. E.g. the "LIKE" operator needs to be rewritten as ColumnName.Contains(filter) etc.
If my memory serves correct I believe that KendoUI MVC have some builtin functionality to handle this type of situation.
Do you have anything similar in the WinForms toolkit ?
Or do you recommend a different approach ?
(Using VS2012, .NET4.5, Toolkit v. 2013.1.321.40)