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

Sorting and filtering problem with GridViewComboBoxColumn

18 Answers 512 Views
GridView
This is a migrated thread and some comments may be shown as answers.
brandon
Top achievements
Rank 1
brandon asked on 07 Dec 2009, 02:27 PM
I have this as my column declaration:
 <telerikGridView:GridViewComboBoxColumn Header="Zone"  DataMemberBinding="{Binding ZoneId}" UniqueName="Zone" SelectedValueMemberPath="Id" DisplayMemberPath="Description" /> 


And I am binding my drop down in code behind:
((GridViewComboBoxColumn)grid.Columns["Zone"]).ItemsSource = e.Result;  

The column works fine for editing and displaying, but when I sort it, it sorts on the ZoneId, not the Description.  When I filter, it gives me a list of Id's, not Descriptions.

18 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 08 Dec 2009, 05:42 PM
Hi Brandon,

You can use the SortMemberPath property on the column to specify the property (Description in your case) that will be used for sorting.


Regards,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
brandon
Top achievements
Rank 1
answered on 08 Dec 2009, 08:50 PM
That worked great for sorting.  Thank you.  How about the filter choices?
0
Stefan Dobrev
Telerik team
answered on 11 Dec 2009, 02:59 PM
Hi Brandon,

For the filtering we are looking into ways to provide this by default when you have a combo box column. Till then the only thing I can think out you can implement is a custom filtering control that filters by the other property.

Hope this helps,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Josh
Top achievements
Rank 1
answered on 05 May 2010, 09:56 PM
Any update on whether this problem for filtering on combobox columns has been resolved?

Thanks
0
Pavel Pavlov
Telerik team
answered on 10 May 2010, 12:46 PM
Hello Josh,

So far the only way to filter a combo box column is by using a custom filtering control . Let me know if you decide to go that way and need an assistance or a sample.

Regards,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jeejee Unwalla
Top achievements
Rank 1
answered on 28 May 2010, 11:09 AM
Hi.

I too am having a problem.

This effectively renders the default GridViewComboBoxColumn filtering useless.

Please could you provide a sample of how to work around this

Thanks
Jeejee
0
Pavel Pavlov
Telerik team
answered on 28 May 2010, 11:58 AM
Hello Jeejee Unwalla,

Please have a look at this blog post. I believe it contains the sample requested.

Kind regards,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jeejee Unwalla
Top achievements
Rank 1
answered on 28 May 2010, 02:42 PM
Hi Pavel,

Thanks for the prompt reply however that does not really help me.

I was looking for the implementation of the default functionality.

Obviously, I need to make the application consistent and to do that I would have to replicate ALL your current functionality for filtering other column types (which I have to say is excellent). Surely that is not your intention because it would be a completely redundant excersize all developers would have to do.

Is this something that will get fixed in future versions? Will there be something like a FilterMemberPath element on the GridViewComboBoxColumn?

FYI, I am using Silverlight 4.0 and the latest version of the builds.

Thanks & Regards,
Jeejee
0
Pavel Pavlov
Telerik team
answered on 28 May 2010, 02:56 PM
Hello Jeejee Unwalla,

Since the filtering logic is executed in the data layer  and the ComboBox column performs the lookup logic in th UI layer( translating selected  value to display value ) the task is more complex than it seems.
Therefore unfortunately  I can not commit we are going to add such features for our very next releases.

Kind regards,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Calin Calin
Top achievements
Rank 1
answered on 18 Jun 2010, 06:18 AM
Hi Pavel,

Why not add a FilterMemberPath same as you have SortMemberPath ?

Regards,
0
Vlad
Telerik team
answered on 18 Jun 2010, 06:45 AM
Hello,

 Generally adding FilterMemberPath will not enable filtering on the lookup value however you can build your own filter control to achieve desired logic.

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
v-govinr@microsoft.com
Top achievements
Rank 1
answered on 02 Jul 2010, 01:20 PM
Hi,
I am facing similar problem,is it fixed or we ned to implement custom filtering.
Can you please guide on the same for silverlight.The blog mentioned above is realted to WPF.
0
Pavel Pavlov
Telerik team
answered on 02 Jul 2010, 01:23 PM
Hi v-govinr@microsoft.com,

For the time being , creating a custom filtering control is the only way to go in such case.
In the previous posts in these threads there are some useful links on how to create one.

All the best,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
George Fryberger
Top achievements
Rank 1
answered on 27 May 2011, 04:42 PM
Any news on when this might be included in a release.  It has been almost a year and half since the original post was made and I am personally disappointed that it isn't there.  You usually do a wonderful job giving us the out of the box functionality that we would want to have.
0
Pavel Pavlov
Telerik team
answered on 01 Jun 2011, 02:35 PM
Hi Kevin ,

This problem is  a not a small  challenge as the lookup logic happens in the UI layer  ( by the combobox itself ) .At the other side -the data layer is responsible for operations such as sorting grouping and  and filtering. We are putting strong efforts in order to solve that discrepancy. However some major refactoring is required and still we are aiming to not introduce breaking changes in the API .
Having this it is a bit hard for me to state a certain date when this wil be provided.

We are doing our best to solve the issue. If you take the latest internal build , you may notice there are some improvements already  - the distinct values in the filter are now translated to Display Member .

Regards,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pankaj
Top achievements
Rank 1
answered on 18 Nov 2011, 06:04 AM
Hi Stefan,

SortMemberPath has to be the property from the itemsource of gridview and not the itemsource of comboboxcolumn. This i read on some telerik blog froom some telerik guy only. Let's take the above example: if i set the sortmember path as decription then it doesn't sort the records but if i set sortmemberpath to zoneid which is the property in the itemssource of radgridview then sorting works but it works on the id and not the description. Please suggest how can I sort on the description?

Please refer the following link.
http://www.telerik.com/community/forums/wpf/gridview/sort-filter-on-a-column-of-type-radgridviewcombobox.aspx
0
Renish
Top achievements
Rank 1
answered on 25 Apr 2016, 12:06 PM

Hi,

I am facing filtering problem, in my filter it always shows Ids. I have tried to use the custom filter using this link http://www.telerik.com/blogs/filtering-gridviewcomboboxcolumn-in-radgridview-for-wpf  but not able still facing issues. Is there any other way to achieve this.

Using Silverlight Q2 2013 v2013.2.724.1050 version. Please help

 

 

 

0
Yoan
Telerik team
answered on 26 Apr 2016, 04:23 PM
Hello ,

With the latest version of Telerik UI for Silverlight, GridViewComboBoxColumn has native filtering support when the source of the column is set through its ItemsSource property. However, you can always use the following approach - you can expose a new read-only property that will contain the value to be displayed in the GridViewComboBoxColumn and set it as FilterMemberPath for the ComboBoxColumn. The FilterMemberPath property of the column allows you to bind to one property and filter by another property of the business object class. I would suggest you to check this example where you can observe the use of FilterMemberPath and ComboboxColumn in action.

Regards,
Yoan
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
brandon
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
brandon
Top achievements
Rank 1
Josh
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Jeejee Unwalla
Top achievements
Rank 1
Calin Calin
Top achievements
Rank 1
Vlad
Telerik team
v-govinr@microsoft.com
Top achievements
Rank 1
George Fryberger
Top achievements
Rank 1
Pankaj
Top achievements
Rank 1
Renish
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or