jQWidgets Forums

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts

  • Rodrigo
    Participant

    Think the right term would be “adaptive rendering”.


    Rodrigo
    Participant

    Hi Peter,

    Ok no worries… and thank you for adding it as a request/feature 🙂

    Rodrigo


    Rodrigo
    Participant

    Hi Peter,

    It turned out that I was running jqwidgets “2.1” I’ve now upgraded to the lastest “2.4.2” and all is well 🙂 just in case anyone else comes across a similar issue.

    Regards,
    Rodrigo

    in reply to: Test Topic Test Topic #8914

    Rodrigo
    Participant

    Hi Peter,

    I must admit… I cannot find the issue with this one! please refer to code listed below.

    The only i see an action happen (error) is if i take the ‘searchString’ out of “data.name_startsWith = $(“#jqxcombobox”).jqxComboBox();”.

    I’m assuming “searchString” is meant to be a variable? but shouldn’t ” $(“#jqxcombobox”).jqxComboBox();” hold the value being typed just like in jquery “$(‘#jqxcombobox’).val()”. If not how do i get that “searchString”?

    $(document).ready(function(){

    var theme = getTheme();
    var productsearch =
    {
    datatype: “json”,
    datafields: [
    { name: ‘productcode’ },
    { name: ‘description’ },
    { name: ‘supplier’ },
    { name: ‘category’ }
    ],
    url: “http://localhost/test/index.php/product/productsearch”,
    data: {
    featureClass: “P”,
    style: “full”,
    maxRows: 6
    }

    };
    var dataAdapter = new $.jqx.dataAdapter(productsearch,
    {
    formatData: function (data) {
    console.log(data);
    data.name_startsWith = $(“#jqxcombobox”).jqxComboBox(‘searchString’);
    return data;
    }
    }
    );

    $(“#jqxcombobox”).jqxComboBox(
    {
    width: 135,
    height: 25,
    source: dataAdapter,
    remoteAutoComplete: true,
    cache: false,
    theme: theme,
    selectedIndex: -1,
    displayMember: “productcode”,
    valueMember: “productcode”,

    renderer: function (index, label, value) {
    var item = dataAdapter.records[index];
    if (item != null) {
    var label = item.productcode + “, ” + item.description + “, ” + item.category;
    return label;
    }
    return “”;
    },

    renderSelectedItem: function(index, item)
    {
    var item = dataAdapter.records[index];
    if (item != null) {
    var label = item.productcode + “, ” + item.description + “, ” + item.category;
    return label;
    }
    return “”;
    },
    search: function (searchString) {
    dataAdapter.dataBind();
    }

    });

    });


    Rodrigo
    Participant

    Hi Peter,

    That’s great thank you! I’ll give it a whirl today 🙂

    Regards,
    Rodrigo


    Rodrigo
    Participant

    Hi Peter,

    Thank your prompt reply.

    Yes i’m using mysql limit e.g:

    $maxRows = $_GET[‘maxRows’];
    select * from products where productcode like ‘%$searchstring%’ limit $maxRows;

    Regards,
    Rodrigo


    Rodrigo
    Participant

    Hi Dimitar,

    That’s awesome! thank you very much mate!

    Regards,
    Rodrigo


    Rodrigo
    Participant

    Hi Dimitar,

    That’s great thank you! just what I need, one question though. I’m loading my data via json, would this present a problem? see my execution below (i have tried your suggested method but not having much luck) :

    updaterow: function (rowid, newdata) {
    // synchronize with the server – send update command
    var data = “command=update&” + $.param(newdata);

    $.ajax({
    dataType: ‘json’,
    url: “/quote/getorder” + cid + oid,
    type: ‘GET’,
    data: data,
    success: function (data, status, xhr) {
    // update command is executed.
    resetnewrowinput();
    $(‘#stageinput’).focus();

    },
    complete: function(){

    $(‘#jqxgrid’).jqxGrid(‘updatebounddata’);
    $(‘#jqxgrid’).jqxGrid(‘ensurerowvisible’, 8);

    }
    });

    }

    in reply to: Field fiter "Grid" Field fiter "Grid" #6870

    Rodrigo
    Participant

    AH HA!!!! Thanks Peter, really appreciate your assistance/patience 🙂 downloaded 1.7.2 and looking better already!

    Have a great one!
    Rodrigo

    in reply to: Field fiter "Grid" Field fiter "Grid" #6868

    Rodrigo
    Participant

    I have also tried using the “filter api” and not having any luck either.

    Essentially all i’d like to do is to have a “text/input” field with a “search/button” next to it. On click of button retrieve the data via json/php and refresh the grid.

    Rodrigo

    in reply to: Field fiter "Grid" Field fiter "Grid" #6862

    Rodrigo
    Participant

    Hi Peter,

    I appreciate your help and don’t mean to be a pain, but I still can’t get the grid to reload the filtered data by doing the sample below. Unfortunately there aren’t any examples of such.

    // FILTER
    var me = this;
    $(“#small-input”).bind(‘keydown’, function (event) {
    if ($(“#small-input”).val().length >= 2) {

    if (me.timer) clearTimeout(me.timer);
    me.timer = setTimeout(function () {

    //dataAdapter.dataBind();
    $(‘#jqxgrid’).jqxGrid(‘updatebounddata’);

    }, 300);

    }

    });

    I get the following error on my console:

    Uncaught TypeError: Object # has no method ‘toArray’ jqxcore.js:7
    a.jqx.invoke jqxcore.js:7
    a.jqx.jqxWidgetProxy jqxcore.js:7
    a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:7
    o.extend.each jquery-1.3.2.min.js:12
    o.fn.o.each jquery-1.3.2.min.js:12
    a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:7
    (anonymous function)

    in reply to: Field fiter "Grid" Field fiter "Grid" #6684

    Rodrigo
    Participant

    Hi Peter,

    That’s great thank you!… just one more thing 🙁 where on the code would i place it? i’ve tried and keep on getting a no object for jqgrid.

    Rodrigo

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