<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
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.
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.
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.
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
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.
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
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.
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
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.
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
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
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
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
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