Hi,
Im trying to bind the items source of a combo box column to a collection of row source object, as the collection items will change per row. The other columns are binding correctly.
<ig:XamGrid ItemsSource="{Binding Path=Issues}" AutoGenerateColumns="False" > <ig:XamGrid.EditingSettings> <ig:EditingSettings AllowEditing="Row" IsEnterKeyEditingEnabled="True" IsF2EditingEnabled="True" IsOnCellActiveEditingEnabled="True" /> </ig:XamGrid.EditingSettings> <ig:XamGrid.Columns> <ig:TextColumn Key="StartDateTimeLocal" Width="Auto" FormatString="{}{0:d MMM yyyy H:mm:ss}" HorizontalContentAlignment="Right" HeaderText="Start Time" /> <ig:ComboBoxColumn Key="UserId" Width="120" ItemsSource="{Binding Path=Users}" SelectedValuePath="LookupId" DisplayMemberPath="Name" AllowEditingValidation="False" HeaderText="Users" > </ig:ComboBoxColumn> </ig:XamGrid.Columns></ig:XamGrid>
Thanks
You would need to set up your ItemSource to a static resource, if you are going to set it up in Xaml. The context of the cell would only be the property that is listed via the Key field. So you wouldn't be able to see a secondary property on the data object.
<ig:ComboBoxColumn Key="Category" Width="120" HorizontalContentAlignment="Stretch" ItemsSource="{Binding Source={StaticResource optionsList}}" SelectedValuePath="Name" DisplayMemberPath="Name" AllowEditingValidation="False">
<ig:ComboBoxColumn Key="Category"
Width="120"
HorizontalContentAlignment="Stretch" ItemsSource="{Binding Source={StaticResource optionsList}}" SelectedValuePath="Name" DisplayMemberPath="Name" AllowEditingValidation="False">
Hi Darrell,I know this thread is super old.. But wanted to know if it is possible to bind Cars(check sample below) to this combobox's itemssource instead of a static list and set displaymemberpath as FavCar ?
Sample:
public class Person
{
public ObservableCollection<string> Cars{get;set;}
public string FavCar {get;set;}
}