jQuery UI Widgets › Forums › General Discussions › Lists › ComboBox › jqxComboBox maxRows per input data
Tagged: combobox, javascript combobox, jquery combobox
This topic contains 5 replies, has 2 voices, and was last updated by Rodrigo 13 years, 8 months ago.
-
Author
-
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
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 StoevjQWidgets Team
http://www.jqwidgets.comHi 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,
RodrigoHi 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 StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
That’s great thank you! I’ll give it a whirl today 🙂
Regards,
RodrigoHi 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 -
AuthorPosts
You must be logged in to reply to this topic.