jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox getSelectedIndex

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 13 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • getSelectedIndex #2131

    bosjabosja
    Member

    Please help,

    I need to get selected item of the combo box, but without event on it. I need it on submit but
    $(“#jqxcombobox”).jqxComboBox(‘getSelectedIndex’); doesn’t work for me.

    getSelectedIndex #2134

    Peter Stoev
    Keymaster

    Hi Boban,

    Thank you for the feedback.

    You can use the following code to get the selected combo item:

    var index = $("#jqxComboBox").jqxComboBox('listBox').selectedIndex

    Best Regards,
    Peter Stoev

    http://www.jqwidgets.com
    jQWidgets Team

    getSelectedIndex #2758

    glovemobile
    Member

    Hi Peter,

    I am new with this jqwidgets. I need to get selected item of the combo box from grid cell popup editing. I am developing simple CRUD application but I have no clue with update data using combo box with default selected from grid.

    Please help… 🙂

    getSelectedIndex #2762

    Peter Stoev
    Keymaster

    Hi glovemobile,

    You can get the selected item of the ComboBox by using the code below:

                    // get selected index.
    var selectedIndex = $('#jqxComboBox').jqxComboBox('selectedIndex');
    // get selected item.
    var item = $('#jqxComboBox').jqxComboBox('getItem', selectedIndex);
    // get selected item's text.
    var itemText = item.label;

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.