This is a migrated thread and some comments may be shown as answers.

Problem with RadDataFilter

1 Answer 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Karim
Top achievements
Rank 1
Karim asked on 23 May 2017, 02:03 PM

Hello,

I have bound a GridView to a bindingsource. The bindingsource are based on the entity frame work and will be set with the following code:

 bsDetekEingabePos.DataSource = (From DetektorPos As tblDetekEingabePos In dbContext.tblDetekEingabePos                                                           Order By DetektorPos.Id Where DetektorPos.SN = "4711" And DetektorPos.VarianteNr = 1
                               
Select DetektorPos).ToList

 

Now I have placed a DataFilter element on my form wich has the same datasource like the grid. I also have implemented the code:

Private Sub RadDataFilter1_Edited_1(sender As Object, e As TreeNodeEditedEventArgs) Handles RadDataFilter1.Edited        RadDataFilter1.ApplyFilter() 
 End Sub

 

But when I select a filter in the DataFilter nothing happens. The grid shows the same data then before.
Do you have any idea what the problem can be?

Thank's in advance
Karim

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 May 2017, 08:26 AM
Hello Karim, 

Thank you for writing.  
 
I would recommend you to have a look at the Demo application >> Data Filter >> First look example which demonstrates how to filter the grid through the RadDataFilter. The RadDataFilter.DataSource property must implement IBindingListView. That is why you can use a BindingSource for the DataSource property of RadGridView and RadDataFilter. However, every BindingSource has a property SupportsFiltering. In case you set an entity set as BindingSource.DataSource, these two properties are automatically set to false. Please refer to the following StackOverflow thread demonstrating a sample approach how you can filter the BindingSource filled with entities: https://stackoverflow.com/questions/12125037/use-filter-of-bindingsource-with-entity-framework

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Karim
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or