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

[Solved] GridView filter shows ID's when combo in cells

2 Answers 136 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Moni
Top achievements
Rank 1
Moni asked on 08 Dec 2010, 03:50 PM
Hi there,
Any hints will be appreciated.
For the explanation I will simplify the whole example
Table-A = has one single column containing ID's of widgets.
The widget names are in Table-Widget.
ID1 = Widget_1
ID2 = Widget_2
Table-Widget to Table-A = one to many.
I have a GridView which feeds off Table-A. It will normally show only the ID's.
Next - I configure a combo-box in each cell of the GridView.
This way now the GridView shows the names, but you can also use this combo to change the value of the given underlying ID.
For example: Original value "Widget_1" - you drop the combo and select "Widget_2"

Problem - the "funel" filter icon on top of the grid shows the ID's.
Hope this is clear.
So ... How do I make it show the Names?
Many thanks

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 08 Dec 2010, 03:58 PM
Hi Moni,

This is a known limitation for RadGridview. We are going to implement a native support for filtering combo columns as an internal feature. Meanwhile the solution would involve writing some additional code .
Such solution I have demonstrated here :  http://blogs.telerik.com/pavelpavlov/posts/10-01-20/filtering_gridviewcomboboxcolumn_in_radgridview_for_wpf.aspx

Kind regards,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Moni
Top achievements
Rank 1
answered on 08 Dec 2010, 04:15 PM
I imported the ComboColumnFilteringControl into the project. Probably important info - I am working on a Prism project
Original code + Adjusted namesspaces etc.
Added the three lines into the GridViewComboBoxColumn definition in the GridView which is in MyModule_View.
<telerik:GridViewComboBoxColumn.FilteringControl>
 <local:ComboColumnFilteringControl />
</telerik:GridViewComboBoxColumn.FilteringControl>
All compiles fine - no errors.

Problem:
When I start the project and call the view with the grid I get an error stating:
"Unhandled Error in Silverlight Application An exception occurred while creating a region with name 'MyModule_MainRegion .... while trying to get instance of type MyModule_View ... Resolution of the dependency failed .... The current build operation failed: The invocation of the constructor on type 'MyModule.Views.ComboColumnFilteringControl' that matches the specified binding constraints threw an exception. '.

ComboColumnFilteringControl.XAML + CS are located under the folder "Views".
I do not have any other code related to registering the control (i.e. in ModuleInit, Controller)
Problem disappears when I comment out the above three lines.

Any ideas will be appreciated.
Tags
GridView
Asked by
Moni
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Moni
Top achievements
Rank 1
Share this question
or