Hello, I have a problem with XamComboEditor item selection. My NetAdvantage version is 2012.2 v12.2.20122.229 and I use Windows 7 x64. I do not know if you still support this version, but here is my problem anyways:
My example demonstrates how I take a collection and bind it to a XamComboEditor and then call ToList() on it and bind it to a second XamComboEditor. Then I will select an item in both boxes, this will work correctly if you add a return; statement right after. If I however do EXACTLY the same thing again, no item will be selected in the box with the ToList() binding. In the other box the item will be selected correctly. The item I am selecting both times is Equal by obj reference AND the Equals method.
The weirdest thing is that if I put the second bind/selection logic into a method and call it from a button event handler, it will work correctly. Not however if I call it from the constructor right after the first selection/bind. Added example
I have downloaded the latest WPF trial and can confirm that the bug still exists
Another problem here - The other XamComboEditor in buttonExample.zip renders weird. I do not know how it looks on your computer(s) but on mine it looks like this: (the second XamComboEditor looks like its about to melt apart)
Hello Ajatollah,
Thank you for your posts!
I have been looking into the sample application you have provided("example.zip") and it seems that I am missing something from your scenario. Would you please provide me with some additional information with about the scenario you are trying to achieve. This way I would be able to further research this issue for you.
Thank you for the provided information. Looking forward to hearing from you.
Hello Gergana
The example demonstrates how two consecutive bindings to the return value of .ToList() called on my collection will cause item selection to fail. This is my code with some added comments for a bit more clarity:
//bind one combobox to _list and the other one to _list.ToList() toListCombo.ItemsSource = _list.ToList(); combo.ItemsSource = _list; //select the first item from _list in both boxes, this works fine var selObj = _list.FirstOrDefault(); toListCombo.SelectedItem = selObj; combo.SelectedItem = selObj; //AGAIN bind one combobox to _list and the other one to _list.ToList() toListCombo.ItemsSource = _list.ToList(); combo.ItemsSource = _list; //AGAIN try to select the first item from _list in both boxes, in the box bound to _list this will work, but in the box bound to _list.ToList() it will not work (UI shows no selection) var selObj2 = _list.FirstOrDefault(); toListCombo.SelectedItem = selObj2; combo.SelectedItem = selObj;
Just to make it even more clear - I would expect the item to be selected and shown as selected in the UI also the second time I select it in the code.
Thank you for the provided information.
I have logged this behavior with our developers in our tracking system, with an issue ID of 181530. I have also created a support ticket on your behalf with number CAS-144113-Q9P7G9 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
Hello Gergana,
Thank you for your feedback, I am glad to see that this issue will be taken care of. I have 2 questions however:
1. Can you provide an estimate on how long it could take until a service release?
2. Is it possible for you to also create an issue for the rendering problem specified in post #4 in this thread, posted on 09-19-2014 10:33 AM? Or should I start a new thread on the forum to address it?
I just want to let you know, that we have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads.
Please do not hesitate to let me know if you have any further questions on this matter.
Hi Gergana
We bought an upgrade license and are already using the latest release in one of our programs and it works as expected. Thank you for your help.