jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox addItem problem!

This topic contains 2 replies, has 2 voices, and was last updated by  dc4m 12 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • addItem problem! #13466

    dc4m
    Member

    Please help!!

    I am using jqxWidgets version 2.6

    When I add a new item to combobox like this:

    $(‘#cbbCustomers’).jqxComboBox(‘addItem’, { value: “Create”, label: ‘Create “‘ + searchString + ‘”‘ });

    or basic:

    $(‘#cbbCustomers’).jqxComboBox(‘addItem’, ‘Create’);

    Combobox added this item but no display label??

    Thank you!

    addItem problem! #13476

    Peter Stoev
    Keymaster

    Hi dc4m,

    The following working script demonstrates how to add a new Item.

    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    var source = [
    "Affogato",
    "Americano",
    "Bicerin",
    "Breve",
    "Café Bombón",
    "Café au lait",
    "Caffé Corretto",
    "Café Crema",
    "Caffé Latte",
    "Caffé macchiato",
    "Café mélange",
    "Coffee milk",
    "Cafe mocha",
    "Cappuccino",
    "Carajillo",
    "Cortado",
    "Cuban espresso",
    "Espresso",
    "Eiskaffee",
    "The Flat White",
    "Frappuccino",
    "Galao",
    "Greek frappé coffee",
    "Iced Coffee",
    "Indian filter coffee",
    "Instant coffee",
    "Irish coffee",
    "Liqueur coffee"
    ];
    // Create a jqxComboBox
    $("#jqxComboBox").jqxComboBox({ source: source, selectedIndex: 0, width: '200px', height: '25px', theme: theme });
    $("#jqxComboBox").jqxComboBox('addItem', 'New Item');
    });
    </script>

    In case you have an issue with that functionality, please provide a sample which demonstrates it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    addItem problem! #13483

    dc4m
    Member

    My problem is missing some settings. Now, i got it works!

    Thank you, Peter!

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

You must be logged in to reply to this topic.