I am trying similar to this code to show data in gridcombo but it shows empty rows. The number of rows in combo matches with number of List<> items but all are blank. I tried this in SL 3 Q2 and also in Q3 beta.
Can you please provide working sample? Also in demo can you please point where I can find similar sample?
GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn();
comboColumn.HeaderText = "Country";
comboColumn.DataMemberBinding = new Binding("CountryID");
comboColumn.ItemsSource = GetCountries();
comboColumn.DisplayMemberPath = "Name";
comboColumn.SelectedValueMemberPath = "ID";
this.RadGridView1.Columns.Add(comboColumn);
private System.Collections.IEnumerable GetCountries()
{
List<Country> countries = new List<Country>();
countries.Add(new Country(){ID=0, Name = "Germany"});
countries.Add(new Country(){ID=1, Name = "Spain"});
countries.Add(new Country(){ID=2, Name = "UK"});
return countries;
}
Thanks,
Jay
Can you please provide working sample? Also in demo can you please point where I can find similar sample?
GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn();
comboColumn.HeaderText = "Country";
comboColumn.DataMemberBinding = new Binding("CountryID");
comboColumn.ItemsSource = GetCountries();
comboColumn.DisplayMemberPath = "Name";
comboColumn.SelectedValueMemberPath = "ID";
this.RadGridView1.Columns.Add(comboColumn);
private System.Collections.IEnumerable GetCountries()
{
List<Country> countries = new List<Country>();
countries.Add(new Country(){ID=0, Name = "Germany"});
countries.Add(new Country(){ID=1, Name = "Spain"});
countries.Add(new Country(){ID=2, Name = "UK"});
return countries;
}
Thanks,
Jay