Am populating the UltraComboEditor from sql server DB on the AfterDropDown/BeforeDropDown event.
The 1st image shows, how the combo's dropdown looks, when i click the combo's down arrow for 1st time. Even thought there is more than 1 data in the comb, the dropdown part is not expanding to show all items.
The 2nd image show, how the combo's dropdown looks, when the combo's down arrow is clicked 2nd time. Now it expands the dropdown part of the combo, showing the items in it.
Every time i click the down arrow button of the combo, the combo gets populated from DB.
I just want to know why 1st time the combo is not expanding.
Am using infragistics winforms controls ver. 13.2.20132.1000
Thank you,
Toji
Hello Toji,
Thank you for contacting Infragistics.
If you make sure you populate the UltraComboEditor in the handler for the BeforeDropDown event, the dropdown will be sized properly.
While loading of items in the grid asynchronously from DB, i see the dropdown is opening first without any items in it and within some milliseconds the combo is getting populated, in this case the dropdown area is not expanding. Is there any method which will refresh the dropdown area to redraw the dropdown when items are populated?
Thank you for your response.
Other than closing and re-opening the drop-down, there is no built-in ability to do what you want. I would suggest posting this as a new idea at http://ideas.infragistics.com. This will allow other users to vote on the idea and will allow our product management team to see the idea.
Thank you for this information.
The UltraComboEditor is not designed to resize its drop-down window while it's dropped down. I would suggest posting this as a new idea at http://ideas.infragistics.com if it doesn't already exist there. If it already exists there, then vote it up.
I was loading the data into the combo while user click the down arrow button on the ultracombeditor.
So as a measure of enhancing user experience i was trying to load the data asynchronously.
One combo was taking like 1-2 seconds for loading when the down arrow was clicked. From the users point of view if they see that, they will feel like system is slow.
I was using an Async function to load the combo(LoadDataAsync()).
This function without the "Await" was making the combo to show up the dropdown area before the items were populated. As a result the dropdown area was not expanding.
Now i added the "Await" keyword, so my function will look like, "Await LoadDataAsync()". I have put a loading icon, when the loading it happening now.
I didn't wanted to add the Await keyword, but as for a temporary fix i did it, so the dropdown will only get opened when the items are populated.
Thanks
Why not load the data synchronously inside of the BeforeDropDown event? All of the data has to be loaded in order for AutoComplete to work, anyway.