jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox ComboBox Sort by add Item

This topic contains 2 replies, has 2 voices, and was last updated by  Deneb Asecas 11 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • ComboBox Sort by add Item #33173

    Deneb Asecas
    Participant

    Hi . First of all, excuse my bad English . I will do my best so that you can understand me.

    I am here for the reason of finding a way to sort items in the combobox already loaded once and add a new item .

    To give you an idea. In my project I have a combobox that when loaded the XHTML, load the combobox with data from a database ( the database give to me the data sorted alphabetically ) . In addition , I add dynamically new data are added to the database and I update the combobox , so that this new data would be accessible.

    The easiest way to do it is every time I add the new data to the database, I clean the combobox back to charge all data sorted alphabetically and thus ordered the new data appear .

    But imagine to have 1,000,000 load data. These will be loaded each time you add an item . Will slightly slow the page. So I wonder if there is a way to insert the item so ordered alphabetically . Why? . It’s simple:

    I can add the new data to the database . If the database tells me that the load was successful, only add the new data to the combobox inserted alphabetically ordered and would not have to clean the combobox and load the last 1,000,000 data I loaded before .

    I hope I implied . If I do not explain correctly, I could explain otherwise.

    ComboBox Sort by add Item #33179

    Peter Stoev
    Keymaster

    Hi denebasecas,

    Sorting in jqxComboBox is not supported, but one approach that you can use is to return a Sorted list from your Server code so that the ComboBox will load the items sorted alphabetically.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    ComboBox Sort by add Item #36591

    Deneb Asecas
    Participant

    Thanks you, Sir. That was very helpful.

    You can close this thread as solved…

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.