We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Populate preselected values in multiselect dropdown component from remote (ajax) source

Hi, i am having difficulties with multiselect dropdown component with remote (ajax) source. Datasource must be remote because of number of records (10K+).

So far i have managed to do basic functionality - that is sending request to server with filtering and that returns results that are used to populate dropdown choices.

However, i also have requirement for populating preselected values and that means that multiselect should show them. That doesn't happen because of the fact that those values are now remote, therefore control should make additional request to get that data.

To be slightly more precise, values that i provide to controle are (for example!) List.

And the values to multiselect control would be in form of List of Text/Value pair (where Value corresponds to values i provide above).

In the end what happens is that multiselect doesn't show Text of preselected values, because there are no Text/Value pair for that Value.


I've tried same thing with Dropdown control, and it works - i see additional AJAX request going to server with filter for id of value i provided.


3 Replies

KR Kresimir October 28, 2022 03:35 AM

Following from similar issue: link

Copy/paste with slight modifications


hello, i've made sample and attached it...

I've included comments in code, but have in mind the follwing:

index.cshtml contains three examples:

  1. dropdown OK
  2. multiselect NOT OK (this is problem that i am asking in this issue)
  3. grid NOT OK (this is from this issue link)

Attachment: Syncfusion_178454_ed8e424c.zip


UD UdhayaKumar Duraisamy Syncfusion Team October 31, 2022 11:12 AM

Hi Kresimir,


Sorry for the inconvenience caused.


We are validating the requirement. We will update the further details in two business days (2nd November 2022).


Regards,

Udhaya Kumar D



UD UdhayaKumar Duraisamy Syncfusion Team November 2, 2022 01:36 AM

Hi Kresimir,


We have considered the reported issue “Does not load the preselect value exceeding to the initial loading data count” as a bug from our end and will be fixed in our 16th November 2022 patch release.


You can track the status of the issue by the below feedback link.

Feedback Link :  https://www.syncfusion.com/feedback/38815


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Udhaya Kumar D



Loader.
Live Chat Icon For mobile
Up arrow icon