jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox ajax submit form combobox get display text

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • mustafa
    Participant

    hi I am using forms
    How can I get ComboBox selected display value? because I see fieldName,I want get combobox text name

    thank you

     <form name=”ajaxform” class=”formData” action=”InsertForm” method=”POST”>
    
    <table style=”width:415px; margin-left:-10px;” class=”tftable”>
    
    <tr>
    <td>
    <label id=”lbCountry”>Country</label></td>
    <td>
    
    <div id=”Country” data-name=”Country” class=”Global Combo Country”></div>
    </td>
    </table>
    </form>
     
    $("#Country").jqxComboBox({
    
                        source: country.List,        
                        displayMember: CountryName,
                        valueMember: CountryId,
                        height: "275px",
                        width: "34px",
                        selectedIndex: 0,
                    });
    



    Peter Stoev
    Keymaster

    Hi mustafa,

    The ComboBox has a method called getSelectedItem which returns the selected item which is an Object. That item has “label” and “value” properties. The “label” will give you the displayed text, the “value” will give you the item’s value member.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.