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

Using a filter on ComboBox Column?

2 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
plusHR
Top achievements
Rank 1
plusHR asked on 23 Mar 2011, 02:49 PM
Okay so I have a combo box grid column which reads a list of values via ria services. I have some pick list values that are bound to the column, however these values also have a company identifier [companyguid], therefore when the user selects the dropdown box I want to only show the pick list values that relate to the company selected in the current row. So I have tried to add a FilterDescriptor with the Path=SelectedItem.companyguid as the filter but no luck it brings up an error.

<riacontrols:DomainDataSource x:Key="ddsCategories"
                                        LoadSize="50"
                                        QueryName="GetReviewCategories"
                                        AutoLoad="True">
              <!--<riacontrols:DomainDataSource.FilterDescriptors>
                  <riacontrols:FilterDescriptor PropertyPath="companyguid"
                                                Operator="IsEqualTo"
                                                Value="{Binding ElementName=radGridView1, Path=SelectedItem.companyguid }" />
              </riacontrols:DomainDataSource.FilterDescriptors>-->
              <riacontrols:DomainDataSource.DomainContext>
                  <ds:AppDomainContext />
              </riacontrols:DomainDataSource.DomainContext>

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 23 Mar 2011, 02:54 PM
Hello Paul,

Unfortunately, you can't bind the FilterDescriptor.Value.

But you can use QueryParameters. Add a server method that will receive a query parameter companyguid and return all entities with this companyguid.

Then add a QueryParameter to your domain data source and bind it's Value to the SelectedItem.companyguid. Make sure you have the domain data source AutoLoad to true so that each time the Value of the QueryParameter is updated through the binding data will be reloaded from the server.

I hope this helps.

Greetings,
Ross
the Telerik team
0
plusHR
Top achievements
Rank 1
answered on 23 Mar 2011, 03:36 PM
Many thanks that did the trick nicely! 

P
Tags
GridView
Asked by
plusHR
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
plusHR
Top achievements
Rank 1
Share this question
or