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

sfcombobox dropdown size changes

Thread ID:

Created:

Updated:

Platform:

Replies:

149799 Dec 10,2019 03:21 AM UTC Dec 14,2019 04:18 AM UTC WinForms 4
loading
Tags: SfComboBox
Tom Krieg
Asked On December 10, 2019 03:21 AM UTC

I have 3 sfcomobox controls, one under the other. Max. drop down entries is set to 12 for each combobox. Each control has as a datasource  a List(OfString)(). The first combobox list is filled when the form opens. When the user selects an entry in sfcombobox1, I do the following.

sfcombobox2.datasource = nothing
sfcombobox3.datasource = nothing
sfcombobox2.rextbox.clear()
sfcombobox3.textbox.clear()
comboList2 = nothing

Then I execute a SQL procedure to get the contents of a list depending on the value of combobox1.
Then I fill the comboList2 with the values of the query table
Then I assign the comboList2 as a datasource to sfcombobox2
i.e.
sfcombobox2.datasource = comboList2.

The entries in sfcombobox3 depend on the selection of sfcombobox3. When the user makes a selection from sfcombobox2, I clear the list and textbox of sfcombobox3 and do a query and re-populate list3 and assign it as datasource to combobox3.

The first time when the form opens and the user makes selections, all comboboxes open showing 12 items. (There are more than 12 items for each list). If the user changes the selection of combobox1 a second time, combobox2 only opens showing 1 1/2 lines. The box is short and th list is cut off. Same for combobox2 and 3. The attached screenshots show what happens.

Can you please advise how I can make sure the combobox dropdowns open the same size for all instances, even if the user keeps changing selections?



Attachment: Problems_with_sfcombobox_1f3f5a4c.zip

Vijayalakshmi Roopkumar [Syncfusion]
Replied On December 10, 2019 03:49 PM UTC

Hi Tom,

 

Thank you for contacting Syncfusion Support..

 

We are currently analyzing the reported behavior with SfComboBox using the provided scenario. We will check and update you details on 12th Dec 2019.

 

Regards,

Vijayalakshmi V.R.

 


Tom Krieg
Replied On December 11, 2019 03:32 AM UTC

Hi Vijayalakshmi,

I've been working on this problem and have found that the behaviour does NOT happen when I clear() the list which is used as the datasource for the sfcombobox. The behaviour only occurs when I set the list = nothing, instead of using list.clear().

One other problem I've found is that when setting the sfcombobox to suggest or suggest/append, if the sfcombobox.text is set to a value by code, the dropdown appears with just one entry, i.e. the suggested value equivalent to the text. To stop this behaviour I've had to set sfcombobox.autocompletemode = none, then fill all the sfcombobox.text fields from a database record, then set autocompletemode to suggest/append. Is there a better way to stop the dropdown happening when the .text property is set by the code?

Vijayalakshmi Roopkumar [Syncfusion]
Replied On December 13, 2019 01:10 AM UTC

Hi Tom,

 

Thank you for your update.

 

Query : I've been working on this problem and have found that the behaviour does NOT happen when I clear() the list which is used as the datasource for the sfcombobox. The behaviour only occurs when I set the list = nothing, instead of using list.clear().

 

When the ItemSource has been cleared using clear method, the item would be properly removed. So we recommend you to use the clear method.

 

Query : To stop this behaviour I've had to set sfcombobox.autocompletemode = none, then fill all the sfcombobox.text fields from a database record, then set autocompletemode to suggest/append. Is there a better way to stop the dropdown happening when the .text property is set by the code?

 

We are currently checking this behavior at our end. We will check and update you the details by 13th Dec 2019..

 

Regards,

Vijayalakshmi V.R.

 


Vijayalakshmi Roopkumar [Syncfusion]
Replied On December 14, 2019 04:18 AM UTC

Hi Michelle, 
 
Thank you for your update. 
 
Query: To stop this behaviour I've had to set sfcombobox.autocompletemode = none, then fill all the sfcombobox.text fields from a database record, then set autocompletemode to suggest/append. Is there a better way to stop the dropdown happening when the .text property is set by the code? 
 
We have checked your reported behavior that you don’t want to open the dropdown after setting the ComboBox’s Text by handling the DropDownOpening event of SfComboBox.Please find the sample for your reference: 
 
 
Please try this solution and let us know if it is helpful. 
 
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