Combobox multi-selection: SelectedItems.Add(item) has very poor performance

1 Answer 159 Views
ComboBox
minh
Top achievements
Rank 2
Iron
Iron
Iron
minh asked on 21 Sep 2021, 08:01 AM

Hi everyone,

 

I have a problem when adding the items into selectedItems of a multi-selection combobox: it take too long (around 30 seconds) to add a list of 260 items.

Is there any possibility to improve that situation?

Many thanks for your help,

Minh tuan

 

Martin Ivanov
Telerik team
commented on 24 Sep 2021, 07:57 AM

I've tried this, but I couldn't reproduce the issue. Can you check the attached project and let me know if I am missing anything?

1 Answer, 1 is accepted

Sort by
0
minh
Top achievements
Rank 2
Iron
Iron
Iron
answered on 27 Sep 2021, 03:40 AM

Hi Martin,

Many thanks for your prompt reply and sample project.

Please find the attached project which simulate more our current situation. In fact, we work on an object of comboItem which has a structure and also we must add a FirstOrDefault() query to make sure we add the corresponding item.

Many thanks for your help

Minh Tuan.

Martin Ivanov
Telerik team
commented on 28 Sep 2021, 01:56 PM

Thank you for the project. On my side I got a 4 seconds delay when clicking on the button. I've tested this also with a virtualization panel and this seems to improve the performance. You can try to replace the default panel with a VirtualizingStackPanel and see if this helps.

<telerik:RadComboBox.ItemsPanel>
	<ItemsPanelTemplate>
		<VirtualizingStackPanel />
	</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>

Alexander
Top achievements
Rank 1
commented on 14 Dec 2022, 03:57 PM

Any updates on this issue. We faced with the same problems in our project.
Tags
ComboBox
Asked by
minh
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
minh
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or