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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiselectioncombobox1.SelectedItems.clear returns an error "InvalidArgument=Value of '-1' is not valid for 'index'"

Thread ID:

Created:

Updated:

Platform:

Replies:

149247 Nov 20,2019 07:17 AM UTC Jan 17,2020 10:42 AM UTC WinForms 5
loading
Tags: MultiSelectionComboBox
sulthan
Asked On November 20, 2019 07:24 AM UTC

im using vb.net.
i fetch column data using dataset and added in selecteditems through for loop

 For i = 0 To DS.Tables(0).Rows.Count - 1
                                    If DS.Tables(0).Rows(I).Item("TRD_GROUPBY") <> 0 Then
                                        comboGrouped.SelectedItems.Add(DS.Tables(0).Rows(i).Item("TRD_display_name"))
                                    End If
                                Next

And, I try for refreshing the selected items in combo box by using comboGrouped.selecteditems.clear() and it returns an error "InvalidArgument=Value of '-1' is not valid for 'index'"

it loads perfect on form load for first time , but after clicking or reloading the same function then returns that error

Vijayalakshmi Roopkumar [Syncfusion]
Replied On November 21, 2019 05:20 PM UTC

Hi Sulthan 
 
Thank you for your using Syncfusion Products. 
 
We  are currently validating the reported requirement regarding MultiSelectionComboBox . We will check and update you details by 25th Nov 2019. 
 
Regards 
Vijayalakshmi V.R 


Vijayalakshmi Roopkumar [Syncfusion]
Replied On November 26, 2019 04:41 AM UTC

Hi Sulthan, 
 
Thank you for your patience. 
 
We have checked your requirement and observe that you want to select the item of ComboBox using Dataset in the form load. We have prepared the sample for the same and you can download it from the following sample link: 
 
 
Please try this solution and let us know if it meets your requirement. 
 
Regards, 
Vijayalakshmi V.R. 


sulthan
Replied On November 28, 2019 07:49 AM UTC

Hi Sulthan, 
 
Thank you for your patience. 
 
We have checked your requirement and observe that you want to select the item of ComboBox using Dataset in the form load. We have prepared the sample for the same and you can download it from the following sample link: 
 
 
Please try this solution and let us know if it meets your requirement. 
 
Regards, 
Vijayalakshmi V.R. 


when a button clicks, I just want to clear the existing selected values in combo box and reload the values again from dataset or datatable and it should add to the selected items in combo box..

ex : 
  cmbStudentList.SelectedItems.Clear()

i used that above line, but that's not clearing the selected items.. Do you have any alternative code to clear the selected items in combo box?

regards
zulfi


Vijayalakshmi Roopkumar [Syncfusion]
Replied On November 29, 2019 01:04 PM UTC

Hi Sulthan, 
 
We have observed your query that you want to clear the items , before adding the items again in the MultiSelectionComboBox.  In order to achieve your requirement , you need to use the same syntax as you mentioned Clear method of SelectedItems collection. But however, when we clear and add the items in MultiSelectionComboBox, we could face that the CheckBox in dropdown not get updated. Please find the screenshot for the same below: 
 
 
 
 
 
 
So we have consider this behavior as a defect and logged the issue report on this. The patch for this fix is estimated to be available on 13th Dec 2019. 
 
You can track the status of this defect using the following feedback link: 
 
 
Regards 
Vijayalakshmi V.R. 


Vijayalakshmi Roopkumar [Syncfusion]
Replied On January 17, 2020 10:42 AM UTC

Hi Sulthan, 
Sorry for an inconvenience caused.

The issue “Selected and Visual Items are not updated properly in MultiSelectionComboBox” has been fixed and the patch for this fix can be downloaded from the following location. Please check and let us know whether this resolves the issue at your end.

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
http://syncfusion.com/Installs/support/patch/17.3.0.26/1201843/F149247/SyncfusionPatch_17.3.0.26_1201843_1172020044328094_F149247.exe
 
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
Assemblies link:
http://syncfusion.com/Installs/support/patch/17.3.0.26/1201843/F149247/SyncfusionPatch_17.3.0.26_1201843_1172020044328094_F149247.zip 
Assembly Version: 17.3.0.26
Installation Directions :
This patch should replace the files “Syncfusion.Tools.Windows” under the following folder.

$system drive:\ Files\Syncfusion\Essential Studio\$Version # \assemblies\$Version#\4.6
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\17.3.0.26\assemblies\17.3.0.26\4.6

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note :
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.

https://www.syncfusion.com/support/directtrac/patches

Disclaimer :
Please note that we have created this patch for version 17.3.0.26 specifically to resolve the following issue reported in the forum #149247

If you have received other patches for the same version for other products, please apply all patches in the order received.


Regards,
Vijayalakshmi V.R.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon