Hello Support,
We are using Infragistics WPF XamComboEditor v12.1. In XamComboEditor we want to display a hyperlink, this item/ hyperlink should be displayed as the last item in the combo. We have attached herewith an screenshot showing the way it should be displayed. Also we have attached a sample code for your reference. Can you please let us know if there is any way we can add hyperlinked item in the combo.
Hi Stefan,
Thank you for your response. We tried applying the DataTemplate using the DataTemplateSelector, however the DataTemplate gets applied correctly but then the XamComboEditor loses the Theme (Metro). Can you please let us know if there is any way that both the DataTemplate and Theme could be applied to the XamComboEditor. We have attached sample code for your reference.
Hello,
As you mentioned it is not possible to set both DisplayMemberPath and ItemTemplateSelector Properties of the ComboBox. This restriction comes from Microsoft and if you want to have hyperlink item in the dropdown you should use ItemTemplateSelector, which means you are not able to set the DisplayMemberPath. AS for the ValueChanged event, I can suggest you add a null check.
Hi Stefan
Thank you for your response. We tried implementing the solution you provided, however, after applying the DataTemplate and ComboStyle style the text is displayed as “System.Data.DataRowView”. We tried setting the DisplayMemberPath property, however, the application give "Cannot set both DisplayMemberPath and ItemTemplateSelector. When one is nonempty, it must be cleared before the other can be set." error when setting the DisplayMemberPath property. We need to set the DisplayMemberPath and ValuePath property’s as we display text and the value to be used internally in the application has to be different. Can you please let us know if there is any other way to set the DisplayMemberPath, as we need the value of the selected item. We have attached herewith the sample application showing the error we get after setting the DisplayMemberPath property.
Further, we are facing another problem with the “ValueChanged” event of the XamComboEditor, we have set the combo to be editable, however when the value in the dropdown is changed the “ValueChanged” event seems to fire twice. Also the second time when the event is trigged, it returns the value as NULL. You can replicate this issue in the sample application we have provided. Can you please review the same and let us know if we are missing anything here.
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I have modified the sample, so now it works as you want. Basically instead of using XamComboEditor with XamComboEditors as Template and EditorTemplate, I used only one. I also used ValueToDispalyTestxConverter to return the correct display value. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.