SfTextBoxExt multi-select not working?

when binding SelectedItems to a collection, the selection doesn't work and nothing gets selected???

am using MultiSelectMode Token

PS: using wpf syncfusion 18.4.0.30

Edit: the problem persists even in wpf syncfusion 18.4.0.46

10 Replies 1 reply marked as answer

RS Ruba Shanmugam Syncfusion Team March 5, 2021 12:06 PM UTC

Hi Joseph,

Thank you for using Syncfusion product.

We have validated your query and checked the provided sample. We would like to let you know that SfTextBoxExt SelectedItems type is object, but you have binded the SelectedItems property to the typeof List<Product>. So only the SelectedItem is cleared.

We have modified the provided sample please get it from below link.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SampleApp_TokenModified-1700705581

Please let us know, if you have any other concerns.

Regards,
Ruba Shanmugam


JO Joseph March 5, 2021 04:57 PM UTC

according to the SfTextBoxExt class definition the SelectedItems property type is IEnumerable not an object, which means it accepts any collection type. so the question now is why it is not accepting any collection type???

in SfTextBoxExt class definition we find this???

public class SfTextBoxExt : TextBox, IDisposable {

     // IEnumerable means it accepts any collection type
     public IEnumerable SelectedItems { get; set; }

}




RS Ruba Shanmugam Syncfusion Team March 8, 2021 12:34 PM UTC

Hi Joseph,

Sorry for the inconvenience. Since SelectedItems is a type of IEnumerable. You have referred a SelectedItems Model inside the Model, so you can resolve this by using ObservableCollection<object> instead of List<Product>. We've modified the sample provided to get it from the link below.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SampleApp_Modified-485027139

Please let us know, if you have any other concerns.

Regards,
Ruba Shanmugam


JO Joseph March 9, 2021 08:17 AM UTC

Still, if its underlying type is ObservableCollection then Why confuse users by making it IEnumerable?

IEnumerable means it accepts any collection type while in fact it doesn't??? so what's gonna prevent users from making the same mistake that I made. if its type is kept IEnumerable then, nothing and users will always fall for the same mistake that I made.

I hope you understand that this is a mistake and should be fixed immediately?


RS Ruba Shanmugam Syncfusion Team March 9, 2021 11:57 AM UTC

Hi Joseph,

We could able to reproduce the reported issue “SelectedItems binding not working properly” and we confirm this as a bug and logged a defect report. You can keep track of the bug from the feedback portal below.

Link: https://www.syncfusion.com/feedback/23145/selecteditems-binding-is-not-working-properly

The provided feedback link is private, and you need to login to view this feedback.

The fix for the reported issue will be available on March 23, 2021.

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

Regards,
Ruba Shanmugam


RS Ruba Shanmugam Syncfusion Team March 23, 2021 09:49 AM UTC

Hi Joseph, 
 
Thanks for your patience. 
 
After our further analysis, as per our current implementation SelectedItems property accepts only an ObservableCollection<object>. While selecting item from the dropdown with the multi selection mode CollectionChanged event will be called instead of property setter. So when binding List of Collection it doesn’t worked. So we have logged feature request for your requirement “SelectedItems different data type binding is not working properly” that can be tracked through our feedback portal below. 
 
 
Please cast your vote to make it count. We will prioritize the features every release based on the demands and we do not have an immediate plan to implement this feature since we committed with already planned work. So, this feature will be available for any of our upcoming releases. 
 
If you have any more specifications/suggestions to the feature request, you can add it as a comment in the portal. We will let you know when this feature is implemented. 
 
Meanwhile we suggest that, you to use a previously provided workaround to resolve the reported issue until then. 
 
Regards, 
Ruba Shanmugam 


Marked as answer

DU Dushan April 17, 2021 02:10 AM UTC

Hello

I just want to confirm what was said in this thread, specifically that "While selecting item from the dropdown with the multi selection mode CollectionChanged event will be called instead of property setter."

The documentation has a List<object> Selected Items and implies that the property setter is called.

Can you pls confirm that the documentation is wrong, and that it should reflect a CollectionChanged event handler?

Dushan


SS Suganya Sethuraman Syncfusion Team April 19, 2021 06:54 AM UTC

Hi Dushan,

We have analyzed your query. In our UG, we used Listobject> for SelectedItems. That is incorrect. We will change and notify you once the changes will publish on live. We appreciate your patience until then.

Regards,
Suganya Sethuraman.
 



SS Suganya Sethuraman Syncfusion Team April 20, 2021 06:26 AM UTC

Hi Dushan,

This UG changes will go live on or before April 30, 2021. We appreciate your patience until then.

Regards,
Suganya Sethuraman.
 



SS Suganya Sethuraman Syncfusion Team May 3, 2021 06:26 AM UTC

Hi Dushan,

We are pleased to inform you that changes have been published and changes are reflected in live.

Regards,
Suganya Sethuraman.
 


Loader.
Up arrow icon