SelectedItem Binding when set to null, Control Updates only after the 2nd click

Hello, unfortunately i have found another bug to one of your controls. I hope this time it will get corrected better and faster than this here 136480.

When using a ComboBoxAdv control with the following configuration, when setting the binded SelectedItem in ViewModel to null, the watermak/token will be appear empty in the UI, but when first clicking the dropdown, the old Token will be displayed. When closing the dropdown and then clicking it again, the correct list of ItemsSource will be displayed.

Could you take a look and fix it ?

This is the exact xaml code of the control, minus the binded names for simplicity:
AllowMultiSelect="False"
IsEditable="True"
IsEnabled="{Binding XXX.YYY}"
Height="25"
EnableToken="True"
DisplayMemberPath="Name"
ItemsSource="{Binding MyItemsSource}"
SelectedItem="{Binding ViewModel.MySelectedItem}"
AutoCompleteMode="Suggest"

Margin="0,10,0,10" />


Edit #2) Same bug happens if i change the binded collection and initially the SelectedItem is null. In the first click an empty token will be displayed and on the 2nd click an item of "No records found" in the list will be displayed. The subsequent clicks are working correctly

Edit #3) Forgot to mention, i am running the latest nuget Version 20.1.0.52 and .net Core 6

With regards
Fanourios Siskakis


8 Replies

MS Mahalakshmi Sugumar Syncfusion Team May 12, 2022 03:07 PM UTC

Hi Fanourios Siskakis,


Case 1: when setting the binded SelectedItem in ViewModel to null, the watermak/token will be appear empty in the UI.


We have created sample with ComboboxAdv, we cannot reproduce the issue. Please refer the attached sample and video.



Case 2: Same bug happens if i change the binded collection and initially the SelectedItem is null.


We modified the ItemSource of the ComboBoxAdv during runtime via a button click, then tested the issue and it did not reproduce at our end.


If we misunderstood the query, please provide more details about the requirement, or modify our sample and revert to us with a reproducible issue or video. So, it will be helpful to prompt the solution on further.


Regards,

Mahalakshmi Sugumar.


Attachment: ComboboxAdv_8a569cb9.zip


FS Fanourios Siskakis May 12, 2022 09:09 PM UTC

I am sorry, but this is laughable... The sample you provided, has nothing to do with what i wrote you above :)


I will provide you with a sample as soon as possible



FS Fanourios Siskakis May 12, 2022 09:33 PM UTC

Here you go :), and again, i am talking about binded elements, not click events from code behind.

So, once more the reproduction steps:


Case 1)
- Select any item of the 1st Combobox.
- Press the button, which triggers the binded command, which sets the SelectedItem to null
- Click the dropdown icon => the old token is displayed. Error
- Click the dropdown icon again => the entire list is being displayed. Correct

Case 2)
- The Collection2 List has items inside.
- Press the button which triggers the command, which empties the binded list.
- Click the dropdown icon => Nothing is being displayed in the list. Error
- Click the dropdown icon => The "No Records Found" text is being displayed. Correct


From my experience, i would say this is the same bug with the combobox not being immediately refreshed, only after the second dropdown click, somehow triggers the update of the token.

Now you have everything you need to reproduce the issue and fix it.

With regards
Fanourios SIskakis


Attachment: ComboBoxwpf_67624465.rar



MS Mahalakshmi Sugumar Syncfusion Team May 13, 2022 02:25 PM UTC

Hi Fanourios Siskakis,


We have confirmed the reported scenario is a defect and logged a report for the reported scenario “SelectedItem and Collection cleared text not cleared properly in the popup collection.” We will include the fix in our upcoming Weekly NuGet release which is scheduled on 31st May 2022(due date).


You can track the status of this defect using the following feedback link:

https://www.syncfusion.com/feedback/34908/selecteditem-and-collection-cleared-text-not-cleared-properly-in-the-popup


If you have any more specification replication procedures or a scenario to be tested, you can add it as a comment in the portal.

Please let us know if you need any further assistance.


Regards,

Mahalakshmi sugumar



MS Mahalakshmi Sugumar Syncfusion Team May 31, 2022 02:01 PM UTC

Hi Fanourios siskakis,

Sorry for the inconvenience,

We fixed the issue. We will update you the fix in our upcoming NuGet release which is scheduled on 7th June 2022. We appreciate your patience until then.

Regards,
Mahalakshmi



MS Mahalakshmi Sugumar Syncfusion Team June 8, 2022 06:31 AM UTC

Hi Fanourios siskakis,


Thanks for your patience.

 We have included the fix in our latest Weekly NuGet release v20.1.0.59 which is available for download
 (
https://www.nuget.org/ ). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.


Regards,

Mahalakshmi




FS Fanourios Siskakis June 13, 2022 10:18 PM UTC

Dear Sir/Madam,

The issue seems fixed now with the version 20.1.0.59.

Thanks a lot

With regards

Fanourios Siskakis



MS Mahalakshmi Sugumar Syncfusion Team June 15, 2022 12:59 PM UTC

Hi Fanourios siskakis,

We are glad to know that your issue has been fixed. Please let us know if you need any other assistance. We are happy to assist you.

Regards,

Mahalakshmi sugumar


Loader.
Up arrow icon