Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Hi,
We are adding row in xamgrid by following code :
<ig:XamGrid.AddNewRowSettings>
<ig:AddNewRowSettings
AllowAddNewRow="Top" />
</ig:XamGrid.AddNewRowSettings>
<ig:XamGrid.EditingSettings>
<ig:EditingSettings
AllowEditing="Row" />
</ig:XamGrid.EditingSettings>
When one column of xamgrid have combobox, then as mentioned in infragistics I am referring as below to bind combobox:
<UserControl.Resources>
<local:CategoryProvider x:Key="categoryProvider" />
<local:CategoryConverter x:Key="categoryConverter" />
</UserControl.Resources>
Question : When more than one column have combobox, then how to implement this . Is it any generic way to implement this or we have to make provider class for every combo.
Hello,
Were you able to resolve your issue?
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
I take it you bind the row to some class of yours and the selected combobox value is stored in a property of that class? The solution you have is totally fine. I would probably add the combobox values list as a property to my class which I already bind to the row. I could easily just bind the list to the combobox and everything works fine.
ExampleClass has a property called Category. I would add there another Property, List<Category> Categories, and then bind that to the ItemsSource of the combobox.
My solution is not anyway perfect but it depends what are your requirements. If the list is the same for each item, then you may want to keep using the StaticResources what you are doing already. I just find my solution to be more flexible when the business logic gets more complicated.