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

Can I bind a GridViewComboBoxColumn.ItemsSource to the selectedItem in another GridViewComboBoxColumn?

2 Answers 216 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marian
Top achievements
Rank 1
Marian asked on 02 Jun 2011, 02:44 PM
I have a form with the following two ComboBoxes:

<ComboBox DisplayMemberPath="dgpGroupDesc" SelectedValuePath="dgpID" Name="cboGroupID" ItemsSource="{Binding ElementName=docGroupDomainDataSource, Path=Data}"></ComboBox>
<ComboBox DisplayMemberPath="dgpSubDesc" SelectedValuePath="dgpSubID" Name="cboSubGroupID" ItemsSource="{Binding ElementName=cboGroupID, Path=SelectedItem.DocSubGroups}"></ComboBox>

With this, the ItemsSource of the second combo box is filtered based on the selected item of the first. Is there anyway to do this in a GridView? I've tried with the following but there are no items in the second combo box:
<telerik:GridViewComboBoxColumn UniqueName="ebookTab" Header="eBook Tab" DataMemberBinding="{Binding dgpID}" DisplayMemberPath="dgpGroupDesc" SelectedValueMemberPath="dgpID" ItemsSource="{Binding ElementName=docGroupDomainDataSource, Path=Data}"/>
<telerik:GridViewComboBoxColumn Header="Document Group" DataMemberBinding="{Binding dgpSubID}" DisplayMemberPath="dgpSubDesc" ItemsSource="{Binding ElementName=ebookTab,Path=SelectedItem.DocSubGroups}" SelectedValueMemberPath="dgpSubID"/>

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 02 Jun 2011, 02:50 PM
Hello Marian,

You may take a look at this blog post for a reference.
 

Regards,
Maya
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
Marian
Top achievements
Rank 1
answered on 02 Jun 2011, 03:10 PM
Thanks for the quick response. I'll take a look at the sample project and see if I can get this working.
Tags
GridView
Asked by
Marian
Top achievements
Rank 1
Answers by
Maya
Telerik team
Marian
Top achievements
Rank 1
Share this question
or