Hi,
I'm not able to get the selected value of a XamComboEditor in a XamDataGrid context :
<igDP:UnboundField Column="8" BindingPath="Fonction.DataValue" Label="Fonction" Width="Auto" BindingMode="TwoWay"> <igDP:UnboundField.Settings> <igDP:FieldSettings EditorType="{x:Type igEditors:XamComboEditor}"> <igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamComboEditor}"> <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}},Path=DataContext.StatutsTvaSelectionnables, Mode=OneWay}" /> <Setter Property="DisplayMemberPath" Value="Libelle" /> </Style> </igDP:FieldSettings.EditorStyle> </igDP:FieldSettings> </igDP:UnboundField.Settings> </igDP:UnboundField>
As you can see, my UnboundField is binded to a property which is an object of the same type as those in the XamComboEditor ItemsSource. My problem is that the XamComboEditor doesn't return the selected object (like a ComboBox via the SelectedItem property) but a string (that you can customise with the ValuePath property). What should I do to get the selected object in my target property ?
Regards,
Sébastien ORGEAS
I found the solution: I have to define the DataType on my UnboundField.
Sébastien
I have converter my project to VS2008 and 9.2 The selected item and value properties still point to an object rather than a string.
If you still have the same issue with that, please attach a project, or modify mine so that it is reproducible.
Hi Alex,
Thanks for your answer but I'm using VS 2008 and Infragistics v9.2.
To reformulate my question, I'd like to know how I can use the XamComboEditor in a XamDataGrid to get the selected item (meaning the selected object, not a string) in the target property defined in my UnboundField.
Hello Sébastien and Jean,
I tested this and I was not able to reproduce this. I am attaching the sample project that I used to test this. Let me know if I am missing something. (testing this against the latest service release for 10.1)
I have the same pb. Anyone has an idea ?
Jean