MultiSelect with huge dataset

1 Answer 22 Views
Data Source MultiSelect
Frederic
Top achievements
Rank 1
Veteran
Iron
Frederic asked on 03 Feb 2022, 12:43 AM

Hi, we need to use mutlSelect with huge dataset, 10k+.

We found a solution that seems to partially work, we just set a pageSize on the dataset, and it works almost perfectly.

https://dojo.telerik.com/@foxontherock/aJeWapAV/6

The DOM stay low, and we can select items outside the first page, and it works well, the items stays on the list of selected items.

The only issue seems to set "initial" values. If these values are not on the first page, they are not displayed and set.

I tried using the "value" parameter, and the .value method.

But, I know it's possible to make it work, because, after, when I select my items in the list, it's perfect.

Is it a bug, or do you have any suggestion to help me set the intial items?

Thank you.

p.s. I DONT want to use virtual property, I tried it and it's difficult to use and doesn't work as expected.

1 Answer, 1 is accepted

Sort by
0
Frederic
Top achievements
Rank 1
Veteran
Iron
answered on 03 Feb 2022, 04:31 PM

For those interrested, I think I found an elegant solution...

Look at version 7 of the same dojo

https://dojo.telerik.com/@foxontherock/aJeWapAV/7

If I apply a filter to my dataset before initializing the multiselect, it renders with the selected items. 

Then, I remove it immediately after, and the widget works as expected.

Telerik, what do you think of that solution, do you think it can do the job or is there something important I forgot?

Thank you!

Frederic
Top achievements
Rank 1
Veteran
Iron
commented on 03 Feb 2022, 09:04 PM

The previous solution was only working when I set value when creating the component.  But, it's not working to change values later.

I found a way to change values later, I need to overwrite an internal function to return a "fake" false...

I think telerik kendo team can take a look at it, and make it work  correctly for people who want a huge dataset, and keep the component run fast.

https://dojo.telerik.com/@foxontherock/OxeFumUt

Now, I hope it will also work for the dropdownlist!

Neli
Telerik team
commented on 07 Feb 2022, 11:47 AM

Hi Frederic,

Note, that when the pageSize is set to 50, only the first 50 items are available in the dataSource view.

As described in the documentation - enabling the paging and setting the pageSize of the MultiSelect is efficient only when these features are used with virtualization.

Thus, although it is possible to set a pageSize without enabling virtualization, it is expected that the initial value could not be set to use an item that is not on the first page. To set the value to such an item you will need to configure the virtual.valueMapper:

- https://docs.telerik.com/kendo-ui/controls/editors/multiselect/virtualization#value-mapping

I hope this helps.

Regards,

Neli

Tags
Data Source MultiSelect
Asked by
Frederic
Top achievements
Rank 1
Veteran
Iron
Answers by
Frederic
Top achievements
Rank 1
Veteran
Iron
Share this question
or