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

Filtering sometimes doesnt work

2 Answers 127 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Marcin asked on 26 Sep 2011, 07:30 AM
Hi,

I have several controls in my app that uses grid. Grid is being used on all of them in the same way:
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding Items}" Margin="0"
                             RowIndicatorVisibility="Collapsed" IsReadOnly="True"                           
                             AutoGenerateColumns="False" CanUserFreezeColumns="False"
                             CanUserResizeColumns="True" MouseDoubleClick="RadGridView1_MouseDoubleClick" IsFilteringAllowed="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding BusinessItem.Name}" Width="*" />
...

however on some of those grids filtering and sorting is working properly, on some grids it is working only on bool columns and on some it is not working at all (I cannot see the 'tube' symbol for filtering and I cannot sort the column by clicking its header).

What may be wrong?

2 Answers, 1 is accepted

Sort by
0
Marcin
Top achievements
Rank 1
answered on 28 Sep 2011, 01:06 PM
I have a clue. I'm binding as a ItemsSource a collection of objects of type C. C derives from B and B derives from A. What is interesting, only those columns have filtering and other features, whom underlying property is declared in class A. So in my example:

public class A {public int P1 {get;}}
public class B : A {public int P2 {get;}}
public class C : B {public int P3 {get;}}

In this case only property P1 will get filtering (via column header).

Could you please tell me the reason of such behavior?
0
Rossen Hristov
Telerik team
answered on 30 Sep 2011, 08:17 AM
Hello Marcin,

Could you send us a small repro project that we can debug. This will be the fastest way to resolve this issue.

Thanks in advance.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Marcin
Top achievements
Rank 1
Answers by
Marcin
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or