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.
Hello,
Thank you for your post. I have been looking into it and I modified the sample you have sent, so now it has the functionality you want. Basically I set the XamComboEditor’s ComboBoxStyle and added ItemTempalteSelector in order to be able to set different templates for the items. The DataTemplates are defined in the App.xaml file, so they could be accessible from all classes. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
We tried running the modified application at our end but the XamComboEditor was not showing exact values and was showing System.DataRowView instead.
Also the "TemplateSelector" is not getting called.
Please let us know the solution for the same.
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.
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.
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.
Hello again,
I have been looking into your sample and as I suggested you before, you should use only a XamComboEditor, not a XamComboEditor with a XamComboEditor in its Template and EditTemplate. I can suggest you check the sample I sent you before, where everything works as you want, and use the same logic in your current sample.
Hi Support
We tried updating the Infragistics service release (12.1.20121.2314) but still we are facing some issues :
XamComboEditot text property is not getting updated properly, we are still getting “System.Data.DataRowView” in the datasource binded and also null text is not getting applied to the xamComboEditor.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I was able to replicate your behavior using version (12.1.20121.1010). I also tested the sample with the latest service release of 12.1 (12.1.20121.2314) and the issue was fixed there, so I can suggest you download it by logging to our web site and going to Account \Keys & Downloads.
https://ko.infragistics.com/my-account/keys-and-downloads/
Please let me know if this helps you or you need further assistance on this matter.
Hi Stefan,
Thank you for the video. We have tried running the sample application which you provided on Mon, Jan 6 2014, however at our end we are still getting the "System.Data.DataRowView" error (as seen in the attached screenshot). I am not sure how the same solution is working at your end. One thing that we observed was your solution was referring dll's of version 13.2, however we are using version 12.1.20121.1010.
Can you please confirm whether this issue is related to the specific version (12.1.20121.1010). Can you please try referencing the dll's of version 12.1.20121.1010 in the sample application and let us know whether you are getting the "System.Data.DataRowView" error at your end or not.