This question is locked. New answers and comments are not allowed.
Hello,
Is it possible to use the GridViewComboBoxColumn when the grid has been bound to a collection of strings? Using you F1 drivers example if I add a Roles property and bind Roles to the GridView Itemsource I can only get it to work if Roles is an object that I speciify rather than a string.
this works...
Is it possible to use the GridViewComboBoxColumn when the grid has been bound to a collection of strings? Using you F1 drivers example if I add a Roles property and bind Roles to the GridView Itemsource I can only get it to work if Roles is an object that I speciify rather than a string.
this works...
public class Driver { private string countryId; private List<Role> roles; public List<Role> Roles { get { return roles; } set { roles = value; } } public string CountryId { get { return countryId; } set { countryId = value; } } } public class Role { private string id; public string Id { get { return id; } set { id = value; } } }
<telerik:RadGridView x:Name="radGridView2" ItemsSource="{Binding SelectedDriver.Roles}" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding Id}" UniqueName="Role" SelectedValueMemberPath="Id" DisplayMemberPath="Id" /> </telerik:RadGridView.Columns> </telerik:RadGridView>this doesn't.....
public class Driver { private string countryId; private List<string> roles; public List<string> Roles { get { return roles; } set { roles = value; } } public string CountryId { get { return countryId; } set { countryId = value; } } }<telerik:RadGridView x:Name="radGridView2" ItemsSource="{Binding SelectedDriver.Roles}" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding}" UniqueName="Role" SelectedValueMemberPath="" DisplayMemberPath="" /> </telerik:RadGridView.Columns> </telerik:RadGridView>
If possible I would like to keep roles as a collection of strings because in the actual scenario that I am trying to use this I am binding to ria services User object IEnumerable<string> Roles property.
Thank you in advance for any help.