jQWidgets Forums

This topic contains 3 replies, has 2 voices, and was last updated by  ivailo 9 years ago.

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

  • admaskks
    Participant

    Hi,

    From the Demo Binding json it demonstrate how we can search and select the display member by using .on(‘select’,xx) function.
    is it possible that I “select” a value member and cause the input shows the display member?
    for example after i perform an action, $(“#comboSearchValue”).val(valuemember);
    and on the jqinput it shows the displaymember

    Thanks.


    ivailo
    Participant

    Hi admaskks,

    You can set both value member and display member with:
    $('#jqxInput').jqxInput('val', {label: "Item 1", value: "1"});

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    admaskks
    Participant

    Hi ivailo,

    Sorry if my question wasn’t clear.
    eg: i have an input with source
    $(“#jqxInput”).jqxInput({ source: dataAdapter, placeHolder: “Contact Name:”, displayMember: “ContactName”, valueMember: “CompanyName”});
    assume there is 2 set of data in it. [“Alvin”,”Apple”],[“Michael”,”Microsoft”]

    The demo below shows that we could get the input value by “select” the display member.
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxinput/bindingtojson.htm

    Assuming i have a var = “Apple” and i would want the input to “select” ‘Apple’, and display “Alvin” when the page load up.

    Sorry again if the explain is confusing.

    Thanks.


    ivailo
    Participant

    Hi admaskks,

    You don’t have to select any member. You simple set the the values about displayMember and valueMember. The result is the same.
    Please, try this demo.

    Best Regards,
    Ivailo Ivanov

    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.