Try to use Add a template column in following way:
<ig:TemplateColumn Key="Organization" > <ig:TemplateColumn.HeaderTemplate> <DataTemplate> <TextBlock Text="MyColumn" /> </DataTemplate> </ig:TemplateColumn.HeaderTemplate> <ig:TemplateColumn.ItemTemplate> <DataTemplate> <TextBlock x:Name="DisplayName" Text="{Binding Organization.ID,Converter={StaticResource IDToNameConverter}}" /> </DataTemplate> </ig:TemplateColumn.ItemTemplate> <ig:TemplateColumn.EditorTemplate> <DataTemplate> <ig:XamComboEditor SelectedItem="{Binding Organization, Mode=TwoWay}" DisplayMemberPath="{Binding Organization.ID,Converter={StaticResource IDToNameConverter}}" Width="310"/> </DataTemplate> </ig:TemplateColumn.EditorTemplate></ig:TemplateColumn>
When user doulble click on cell to enter edit mode, got following error:
at MS.Internal.XcpImports.GetClassFullName(String coreClassName) at System.Windows.DependencyProperty.LookupAttachedCoreProperty(String propertyName) at System.Windows.PropertyPathParser.GetDpFromName(String name, Boolean namespaceMappingAvailable) at System.Windows.PropertyPathParser.ReadAttachedPropertyStepDescriptor(Boolean calledFromParser) at System.Windows.PropertyPathParser.ReadStepDescriptor(Boolean calledFromParser) at System.Windows.PropertyPathParser.Parse() at System.Windows.Data.Binding..ctor(String path) at Infragistics.Controls.Editors.XamComboEditor.ResolveText(Object dataItem) at Infragistics.Controls.Editors.XamComboEditor.InvalidateSelectedContent() at Infragistics.Controls.Editors.XamComboEditor.SelectedItems_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) at System.Collections.ObjectModel.Collection`1.Add(T item) at Infragistics.Controls.Editors.XamComboEditor.SelectItem(Object data, Int32 index, Boolean clearRestOfSelection) at Infragistics.Controls.Editors.XamComboEditor.ApplyItemSource(IEnumerable itemSource) at Infragistics.Controls.Editors.XamComboEditor.XamWebComboEditor_Loaded(Object sender, RoutedEventArgs e) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
it is because of binding for DisplayMemberPath in XamComboEditor.
If remove converter, setDisplayMemberPath ="{Binding Name}", no error but only display object like Organization:1234 in dropdow.
If remove binding,set DisplayMemberPath="Name", it is fine.
So want to know if DisplayMemberPath support binding? how to fix it? I want to display more data for DisplayMemberPath, that's why I try converter.
Hello,
I have been looking into the issue that you have described and I could not managed to reproduce it. Would you please provide me with more detailed information regarding the environment in which you are developing you application(Operating system, Service Release, Integrated development environment and the specific version of our product that you are using) and if possible more detailed steps to reproduce the issue that you are having?
Looking forward to hearing from you.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you. It is working when use template with IsEditabl.
Another question:
for the new row, click on the item , xamecomboditor dropdown popup will dispaly quickly.
For for existing row, if there is one item selected already from xamcomboeditor, and want to change it to another. Click on the item, the dropdown popup coming out very slow, need to wait for 4-5 second for my case. How to imorove the performance for this case?
The reason for the exception that you are getting is that you are setting the DisplayMemberPath property to string that does not corresponds to any property of the objects that are used as a source of the XamComboEditor. When you are setting the DisplayMemberPath property a binding is created to the property of the data source that has the same name as the value of the DisplayMemberPath. If you are using a converter to return a string that does not match one of the properties of the underlying data, it is expected to get an error.
I can suggest setting the IsEditable property of the XamComboEditor to false and use the ItemTemplate property. In the ItemTemplate you can add a TextBlock for example and bind the Text property to the Id of your object and using your converter you can display the text that you are looking for.
Please let me know if you need any further assistance on the matter.