Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
background loading of items in combo/drop down
posted

The application i'm working on is based on a ditributed architecture. One of the windows of our winform applications has several drop downs/combos. A basic approach is to retrieve all the data for the drop downs/combo before the window opens. An issue with this approach is the hit retrieving all the data even though the user might not select a item from any drop down. Unfortunately, a couple of the drop downs have a large number of items.  My idea to make the window responsive is to asynchronously retrieve and load the items into the drop down when the user clicks on the drop down. Display an animation/loading message in the area of the drop down until the data is returned from the server and displayed. This interaction I have seen in the yahoo mail client when you first click on the More Actions menu item.

 I'm wondering if this is possible with the Winform controls and any suggestions to accomplish this.

 

Cheers

Peter

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Peter,

    If you are using UltraCombo, I imagine you could use the BeforeDropDown event to populate the data. 

    But I'm a little concerned by what you mean by asycnhronously. If you want to load the data on a different thread then you need to be very careful about how you do it.You may want to use the BackgroundWorker component and don't bind the UltraCombo to the data source until the data source is completely filled and the background thread has finished. If you bind the data source to the UltraCombo first and then try to perform any operations on the data source, the data source will send notifications to the control across threads without proper marashalling and this will cause you all sorts of problems. :)

     

Children
No Data