I have a custom ICollection which I wanted to use with the MultiSelect control, however, the Value property is of type List<T>. This is very restrictive; the property should implement an interface for flexibility.
ADMIN EDIT: When voting, please add your comment on what you would prefer so we can gauge the needs people have and act accordingly.
Hi Paul,
I have updated the title to include the IList<T> idea so we can see whether that will appeal to more people.
Regards,
Marin Bratanov
Progress Telerik
Hi Marin,
I believe IList<T> would suffice without any breaking changes as List<T> directly implements that interface.
Unfortunately, I cannot convert to List as its a custom implementation of ICollection<T> to do additional logic for the Add/Remove methods. I could however, change my custom collection to inherit from IList<T> as it also inherits ICollection<T> and would be a simple change.
Hi Paul,
What I can suggest is that you add a field in the view-model that's a List<T>, and use its getter and setter to convert it from the ICollection<T>.
That said, I am not sure if moving to an ICollection is a viable option for the component, because the List allows for more features - like sorting, random access and modified, while also such a change might be perceived as a breaking change by our existing customers.
Nevertheless, I am keeping this item open in the portal so we can gauge the community interest in such a change and its popularity. If it gets enough traction, it will be considered for implementation.
Regards,
Marin Bratanov
Progress Telerik