Hello I'm trying to add depandable comboboxes to RadGridView and my Comoboxes always empty. What I do wrong? For examle I want to add Club and Players to grid - Select Club and then Select Player from players of this Club
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding Name, Mode=TwoWay}"
ItemsSource="{Binding ClubList}" Width="120" IsReadOnly="False" Header="Club Name"
SortMemberPath="Name"
SelectedValueMemberPath="Name"
IsComboBoxEditable="True"
telerik:TextSearch.TextPath="Name"
DisplayMemberPath="Name"
/>
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding PlayerName, Mode=TwoWay}"
ItemsSource="{Binding PlayerList}" Width="120" IsReadOnly="False" Header="Player Name"
SortMemberPath="Name"
SelectedValueMemberPath="Name"
IsComboBoxEditable="True"
telerik:TextSearch.TextPath="Name"
DisplayMemberPath="Name"
/>
public class ClubLinks : INotifyPropertyChanged
{
public string Name
{
get { return this.name; }
set
{
if (value != this.name)
{
this.name = value;
this.OnPropertyChanged("Name");
}
}
}
public string PlayerName { get; set; }
private ObservableCollection<Club> _clubs;
public ObservableCollection<Club> ClubList
{
get
{
if (this._clubs == null)
{
this._clubs = Club.GetClubs();
}
return this._clubs;
}
}
public ObservableCollection<Player> PlayerList
{
get
{
if (null == this.players)
{
this.players =
new ObservableCollection<Player>()
{
new Player(){Name = "Pl1_" + name},
new Player(){Name = "Pl2_" + name},
new Player(){Name = "Pl3_" + name},
new Player(){Name = "Pl4_" + name},
};
}
return this.players;
}
}