jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox jqxComboBox maxRows per input data

This topic contains 5 replies, has 2 voices, and was last updated by  Rodrigo 12 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • jqxComboBox maxRows per input data #8845

    Rodrigo
    Participant

    Hi Guys,

    I have just started using jqxComboBox in “remote search” mode which is working great! and i’ve worked out how to initialise the box with a blank value by setting “selectedIndex: -1”. This will allow the user to type what ever they wish.

    Problem i’m having is with “maxRows” I have set it to “6” but i’m still getting all 20 products listed (testing products). Potentially i will have hundreds/thousands of products… and cannot load all in one go. I have set a limit of “6” in my query, but it doesn’t seem to call the database on re-enter of another product.

    I’m sure i’m doing something silly somewhere, your help is much appreciated!

    Regards,

    Rodrigo

    jqxComboBox maxRows per input data #8859

    Peter Stoev
    Keymaster

    Hi Rodrigo,

    How do you handle the “maxRows” field in your server script? Do you limit your query like MySQL’s LIMIT ? Could you provide additional details and a code snippet regarding your scenario and your server side code?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxComboBox maxRows per input data #8885

    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

    jqxComboBox maxRows per input data #8896

    Peter Stoev
    Keymaster

    Hi Rodrigo,

    If this does not work, then may be the $maxRows value is not Ok. I suggest you for test purposes to hard-code your $maxRows value in your query to 6. Your server script will be called each time the following is executed:

                    search: function (searchString) {
    dataAdapter.dataBind();
    }

    In addition, you can disable the Ajax caching by setting the source’s object’s ‘cache’ field to false.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxComboBox maxRows per input data #8901

    Rodrigo
    Participant

    Hi Peter,

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

    Regards,
    Rodrigo

    jqxComboBox maxRows per input data #9009

    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

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

You must be logged in to reply to this topic.