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

telerik:GridViewComboBoxColumn filtering functioin error

4 Answers 52 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deng
Top achievements
Rank 1
Deng asked on 08 Oct 2012, 04:11 PM
Hi Guys,

I used telerik wpf gridview to bind a collection source, the every data item have a foreign key related other tables, so I use the GridViewComboBoxColumn to show the relation and make user can change it . below is my code
<telerik:GridViewComboBoxColumn Header="{common:Translate Group}"
UniqueName="ColourGroupingID"
DisplayMemberPath="Description"
ItemsSource="{Binding ColorEntityCollection}"
SelectedValueMemberPath="ColourGroupingID" DataMemberBinding="{Binding ColourGroupingFk}"
>
</telerik:GridViewComboBoxColumn>
In above code, you can see ColorEntityCollection have two properties used for valuePath and displayPath of combobox, dataItem's ColourGroupingFk is foreign key. Everything is ok, but the filtering, the gridview unexpectedly filtered by ColourGroupingFk  , not expected DisplayMemberPath : Description . Please see attachment.

How can I do this? PS: I also set Gridview's FilteringMode = FilteringMode.FilterRow for using a header filter row.  I read many threads on forum, many thread recommand :
<telerik:GridViewComboBoxColumn.FilteringControl>
                    <Controls1:ComboColumnFilteringControl />
                </telerik:GridViewComboBoxColumn.FilteringControl>

But our team don't need popup filter window, only row filter. Please help me.. Thanks very much!






4 Answers, 1 is accepted

Sort by
0
Deng
Top achievements
Rank 1
answered on 10 Oct 2012, 12:40 PM
Does anyone have a work around about this issue?
0
Rossen Hristov
Telerik team
answered on 10 Oct 2012, 01:04 PM
Hi,

That is the expected behavior. Filtering is a data operation and can only be done on data values, not display values. In other words, you can only filter on what you have bound your column to, since that is the thing that is in the data collection.

To display a filter row in the column headers, you can use the Filter Row feature of the grid.

Kind regards,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Deng
Top achievements
Rank 1
answered on 10 Oct 2012, 02:21 PM
Hi ,

Thanks for your helping. Now I have used a filter row, it worked well but ComboboxColumn,  I want it can filter by ComboboxColumn's display member, not its value member. I think this is very common feature for ComboboxColum. Is there any other way to solve it?
0
Deng
Top achievements
Rank 1
answered on 15 Oct 2012, 03:57 AM
Is there a tutorial that describe how to customer filter row? If yes, I think I can solve this problem...
Tags
GridView
Asked by
Deng
Top achievements
Rank 1
Answers by
Deng
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or