Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Cannot set both ItemTemplate and DisplayMemberPath on XamComboEditor
posted

Hello Support,

        I'm using Infragistics v14.2 and VS 2013 with Framework 4.0. My requirement is I want a XamComboEditor with Multiple DataTemplates. i.e. My DataItems will be having default template. But my Last DataItem of the combo should be a hyperlink. So I have created ItemTemplateSelector having these both templates but when i tried applying ItemTemplateSelector for drop down items and DisplayMemberPath to actually display selected item in combo editor, it raises run time error as "Cannot set both DisplayMemberPath and ItemTemplate" because i runtime binds data source and sets DisplayMemberPath each time when it focuses.

        To workaround this, i tried removing DisplayMemberPath, it shows items properly in drop down but showing "System.Data.DataRowView" in combo editor after select any item. 

        For the second workaround, i also tried above solution and settings SelectedText property to replace the string "System.Data.DataRowView" in "XamComboEditor_TextChanged" but it flickers and user is able to see the manipulation of values. Even i have tried applying style to get the same effect but not succeed. I have tried searching solution on your forums, but didn't find any specific one. So is there any possible workaround for this? I Have attached sample application for your understanding.

XamComboEditor.zip
  • 138253
    Offline posted

    Hello Ashish,

     

    Thank you for your post. I have been looking into it and I can suggest you see this forum thread:

     

    http://www.infragistics.com/community/forums/t/85483.aspx

     

    where a similar question is already discussed. Please let me know if you have further questions on this matter.

     

    Looking forward for your reply.

  • 138253
    Offline posted

    Hello Ashish,

     

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.