Posted 19 December 2017, 6:15 am EST
Hi All,
i use C1ComboBox
when i do Clear function on C1ComoBox return exception
look at the following attachment (C1ComboBox.png)
Thanks,
Saleem
Forums Home / ComponentOne / WinForms Edition
Posted by: samo3889 on 19 December 2017, 6:15 am EST
Posted 19 December 2017, 6:15 am EST
Hi All,
i use C1ComboBox
when i do Clear function on C1ComoBox return exception
look at the following attachment (C1ComboBox.png)
Thanks,
Saleem
Posted 19 December 2017, 7:15 am EST
Hi,
I could not replicate the issue with latest build.
http://prerelease.componentone.com/dotnet40/C1WinForms/2017-T3/C1WinForms.4_4.0.20173.286.zip
Please check with the same build.
If this does not solve your issue them share a sample application so that we can assist you further accordingly.
Thanks,
Singh
Posted 19 December 2017, 8:45 am EST
thank you Singh
i found the problem
the following line:
this.cmbLoadFilterSort.DropDownStyle = (C1.Win.C1Input.DropDownStyle)System.Windows.Forms.ComboBoxStyle.DropDownList;
This is what makes the problem
but how i can clear all combobox values ?
Thanks,
Saleem
Posted 20 December 2017, 12:03 am EST
Hi,
Please use the below suggestions:
C1ComboBox1.TextDetached = True;
C1ComboBox1.Clear();
C1ComboBox1.Items.Clear();
If you are using ItemsDataSource for items then assign it to null as:
C1ComboBox1.ItemsDataSource = null;
For more info see the documentation at http://help.grapecity.com/componentone/NetHelp/c1input/webframe.html#C1ComboBox%20Control%20Overview.html
Hope, it will solve your issue.
Thanks,
Singh