Hello,
I got a weird problem with using XamComboEditor, but I could not reproduce it in a small solution.
1. When I load the XamComboEditor, I set the selectedItem in back end code. The item is selected, but it is not shown in the textbox.
Following is when it is loaded, the first
If I click the dropdown button, it is as following:
2. I am using twoway mode binding. But when I set the selectedItem in the back end code, the dataContext is not updated. And the convertBack function in the converter is never called. But if I change the selectedItem from the browser, the dataContext is updated properly.
I tried to repro it in a simple solution, but I could not repro the problem any more. I am sorry if you could not understand the problem without a demo.
Anyone has an idea?
Thank you very much
Hello Elena,
I found out what the problem was. The assignment of the value must always be done after loading the list of values. Loading occurs whenever the dropdown is opened. My problem is solved.
Thanx for asking.
Regards Manfred
Hello Mani_Infineon,
I can see your concerns still I am not able to reproduce this behavior on my side. If you could provide me with a small sample where this issue is representable or modify the one that I attached I will be happy to have a look at it.
Thanks in advance.
I face the same problem, when I set the selectedItem in the back end code. The list entry is selected correctly, but there is no value in the Textbox. I found a small difference
This is set by code ( xmcce.SelectedIndex = i; ) ...
...
and this is set by mouseclick.
It looks like the entry is not marked correctly and thats maybe the reason why the text is not displayed
Hello ShirleyLiu,
I have been looking through your post and I am not sure what may cause the behavior that you are describing. I try to recreate your scenario by creating a small sample where XamComboEditor is bound to ObservableCollection and on my side I am not able to reproduce the issue. Would you please have a look at the attached sample and try modifying it in order to represent your issue, so I can continue my investigation on this matter. Also would you provide me with the code for the converter that you mentioned.