jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox getItemByValue returns undefined

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • getItemByValue returns undefined #13321

    gharms27
    Member

    Hello,

    I have a ComboBox and I’d like it to show the saved value when the form is opened but the getItemByValue method returns “undefined”.  I’ve verified value supplied exists in the list.  What am I missing here?

    var source =
    {
    datatype: “json”,
    contentType: “application/json; charset=utf-8”,
    type: “POST”,
    datafields: [
    { name: ‘Grade’ },
    { name: ‘GradeDesc’}
    ],
    url: BusinessData_WEBSERVICE_URL + “GetGradeNames”,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 12
    }
    };

    var dataAdapter = new $.jqx.dataAdapter(source);

    $(“#jqxcombobox_MaterialGrades”).jqxComboBox(
    {
    width: 250,
    height: 25,
    source: dataAdapter,
    autoComplete: true,
    theme: theme,
    selectedIndex: 0,
    displayMember: “GradeDesc”,
    valueMember: “Grade”
    });

    var item = $(“#jqxcombobox_MaterialGrades”).jqxComboBox(‘getItemByValue’, ‘G10260J29’);
    $(“#jqxcombobox_MaterialGrades”).jqxComboBox(“selectItem”, item);

    getItemByValue returns undefined #13341

    Peter Stoev
    Keymaster

    Hi gharms27,

    Could you please post a complete example which demonstrates your scenario? In addition, please check whether you use the very latest version of jQWidgets which supports the “getItemByValue” method, as that is a new API for the widget

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    getItemByValue returns undefined #13392

    gharms27
    Member

    Thanks Peter, it was a version problem. I was using v2.5 and after updating to v2.6 the getItemByValue method is working now.

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

You must be logged in to reply to this topic.