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

GridViewComboBoxColumn dependant value in MVVM

2 Answers 123 Views
GridView
This is a migrated thread and some comments may be shown as answers.
didier
Top achievements
Rank 1
didier asked on 19 May 2011, 03:08 PM
Hi,
I would want to make a gridviewcomboboxcolumn dependant on an another gridviewcomboboxcolumn with the MVVM pattern.
Do you know if it's possible an how i can do that ?
if I use a template i can use a code like this
<telerik:GridViewDataColumn Header="{Binding Path=Strings.RemiseView_EnteteGarantie, Source={StaticResource ApplicationResources}}" IsReadOnly="True" >
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <telerik:RadComboBox Style="{StaticResource RemiseView_ComboBox}"
                        ItemsSource="{Binding ListGarantie,Source={StaticResource remiseViewModel}}"
                        DisplayMemberPath="Nom"
                        SelectedItem="{Binding SelectedGarantieItem,Mode=TwoWay ,Source={StaticResource remiseViewModel}}"
                        SelectedValue="{Binding GarantieId, Mode=TwoWay}" ClearSelectionButtonContent="Effacer"
                        SelectedValuePath="GarantieId"/>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
with the selecteditem binding on the view model, but it's not really good, if I have two row the filter is bad and it's not a gridviewcomboboxcolumn... 




2 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 20 May 2011, 08:24 AM

Hi didier,

Could you please take a look at this blog post which demonstrates how you can construct the so called Cascading ComboBoxes. 



Best wishes,
Milan
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
didier
Top achievements
Rank 1
answered on 20 May 2011, 02:45 PM
Thanks for the reply but the sample is quite simple.
My dependant combobox are in a grid so i can't "just" change the itemsource list, i thinks it's better to add a filter to the combobox otherwise all the previous rows will be blanks....
Tags
GridView
Asked by
didier
Top achievements
Rank 1
Answers by
Milan
Telerik team
didier
Top achievements
Rank 1
Share this question
or