jQWidgets Forums

jQuery UI Widgets Forums Grid ComboBox autofill true (How can I handle large data sets)

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 12 years, 3 months ago.

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

  • DavidSimmons
    Participant

    When using JSON ComboBox with Autofill=true, How can I only lookup what has been entered to reduce the number of records. I might have 10,000 items in the list without filtering….

    var ProductSource = {
    datatype: “json”,
    datafields: [
    { name: ‘ID’ },
    { name: ‘Product’ }
    ],
    id: ‘id’,
    url: ‘../Product/ProductJSON.php’,
    async: false
    };

    var ProductDataAdapter = new $.jqx.dataAdapter(ProductSource, {
    autoBind: true,
    beforeLoadComplete: function (records) {
    var data = new Array();
    for (var i = 0; i < records.length; i++) {
    var trend = records[i];
    data.push(trend);
    }
    return data;
    }
    });

    { text: 'Product', datafield: 'Product', width: 150, pinned: false, editable: true, filterable: true, filtertype: 'textbox', columntype: 'combobox',
    createeditor: function (row, column, editor) {
    editor.jqxComboBox({selectedIndex: 0, source: ProductDataAdapter, autoComplete: true, autoOpen: false, searchMode: 'startswithignorecase', enableSelection: true, displayMember: "Product", valueMember: "ID"});
    editor.bind('select', function (event) {
    var item = event.args.item;
    if (item) {
    var value = item.value;
    var label = item.label;
    ProductIndex = value;
    }
    });
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == "") return oldvalue;
    }
    },


    Dimitar
    Participant

    Hello DavidSimmons,

    Please check out the demo Remote Search, which shows searching in a large data set.

    On a side note, please refer to the forum guide to Code Formatting.

    Best Regards,
    Dimitar

    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.