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

Column Header sort and filter not enabled

4 Answers 124 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Greg Johnson
Top achievements
Rank 1
Greg Johnson asked on 16 Nov 2010, 11:20 PM
I have a RadGridView that has data in it, and I apply a filter to the column with the Filter1 component.

For example, I have a string column type, and I add the filter 'Not Equal To Foo'

All works fine.  I save the filterdescriptors when I close the application.  When I open the application the next time, the data collection is empty, but the saved filter is applied.

Now when I mouse over the column header, the Filter Icon does not appear, even tho the IsFilterable is set to true, and the column has a filter decsriptor that was applied to it.  Neither the Filter or the Sort will work on the columns in the grid.  If I step into the grid and look at the Header Cell, the PropertyType is set to null.

If there is data in the collection, then the filtering and sorting work fine, even if there is no row that matches the value 'Foo'.

It seems that if the ItemsSource data collection is empty, and you apply filter descriptors, the header cells don't get the property type set, and this disables the sorting and filtering.  After adding items to the data collection, they show up in the grid just fine, but no sorting or filtering works on the grid.

We see this problem after updating to the Q2 release, where in the prior release this was working correctly.

Has anybody else worked with adding filter descriptors to the grid's FilterDescriptor collection programmatically had any problems doing this?  

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Nov 2010, 08:16 AM
Hello,

 Our latest official release is Q3 2010. Can you post more info about the collection bound to the grid?

Regards,
Vlad
the Telerik team
See What's New in RadControls for WPF in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
rahma
Top achievements
Rank 1
answered on 12 Dec 2010, 10:28 PM
Hello guys,
I have a similar problem.
I bind a DataView to a telerik GridView. When loading my WPF application, the DataView is empty. So the filter does not exist. When adding new rows to my data view the filter does not appear. I think there is a problem with the GridView filter when the itemsource is empty on the first load.

How can I resolve this problem?
0
Vlad
Telerik team
answered on 13 Dec 2010, 10:18 AM
Hello ,

 I've tried this with our latest official release (Q3 2010) and everything worked as expected. You can check the attached project for reference. 

Greetings,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
rahma
Top achievements
Rank 1
answered on 14 Dec 2010, 10:18 PM
Hello,
Thank you admin for answering.
Te problem persists in Q1 release. I find a solution to avoid this bug. When inserting a dataRow in my dataview, i test if it is the first one, i recreate all the grid. So that the filter appears.

Greetings,
Tags
GridView
Asked by
Greg Johnson
Top achievements
Rank 1
Answers by
Vlad
Telerik team
rahma
Top achievements
Rank 1
Share this question
or