jQWidgets Forums

jQuery UI Widgets Forums Grid ComboBox auto how to pass data

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • ComboBox auto how to pass data #12012

    DavidSimmons
    Participant

    How can I add data to the lookup for autoFill? I am testing the data.name_startsWith for my php but need to send a company as well. I have defined a Company Object at the top of my Javascript. In the field Contact which I am doing a autoFill lookup on cellbeginedit I set the Company value. I am trying to use this to filter contacts based on the Company column….

    I would Appreciate any help….

    var Company = new Object();
    …..

    cellbeginedit: function (row, datafield, columntype) {
    Company.value = $(‘#jqxgrid’).jqxGrid(‘getcellvalue’, row, “CompanyID”);
    },

    var ContactSource = {
    datatype: “json”,
    datafields: [
    { name: ‘ID’ },
    { name: ‘Contact’ }
    ],
    id: ‘id’,
    url: ‘../Contact/ContactJSON.php’,
    async: false,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 12
    }
    };

    var ContactDataAdapter = new $.jqx.dataAdapter(ContactSource, {
    formatData: function (data) {
    data.name_startsWith = ContactSearch;
    return data;
    }
    });

    ComboBox auto how to pass data #12018

    Peter Stoev
    Keymaster

    Hi David,

    In order to send the Company’s value, you can write something as:

    var ContactDataAdapter = new $.jqx.dataAdapter(ContactSource, {
    formatData: function (data) {
    data.name_startsWith = ContactSearch;
    data.Company = Company.value;
    return data;
    }
    });

    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.