jQuery UI Widgets › Forums › Lists › ComboBox › JQX ComboBox Not picking up user input values for search
This topic contains 1 reply, has 2 voices, and was last updated by svetoslav_borislavov 1 year, 10 months ago.
-
Author
-
I have a JQXcombo box that dynamically searches from user input (multiselect), on some instances: i am encountering an issue where the combobox is not picking up all of the user text.
Example: user types in “Chi”, the Combo box only searches for “Ch”I am using a json source along with a data adapter along with jqxcombobox search property. I tried playing around with the different preferences, especially with the remote autocompletedelay setting, no luck.
Any help on this is greatly appreciated!
—————————————————————————-
Here is a rough code snip-it of the settings that I have on:var dataAdapter = new $.jqx.dataAdapter(source,
{
autoBind: true,
async: true,
formatData: function (data) {
var searchInput = $(#NAME).find(‘.jqx-combobox-input’).val();
if (searchInput) {
data.searchString = searchInput;
}
return data;},
loadComplete: function (data) {
///Code
},
loadError: function (xhr, status, error) {
console.log(“#Name” + error.message);
}
}
$(#NAME).jqxComboBox(“destroy”);
$(#NAME).jqxComboBox(
{
theme: ‘red’,
width: ‘90%’,
height: ’25px’,
source: dataAdapter,
remoteAutoComplete: true,
remoteAutoCompleteDelay: 300,
dropDownHorizontalAlignment: this.HorizontalAlignment,
autoDropDownHeight: false,
multiSelect:true,
displayMember: “DisplayName”,
search: function (searchString) {
dataAdapter.dataBind();
}
});Hi,
You are sending the search string to the server, it is your task to get the searched data.
In the format function, you can log the search input and see that it is the right query.
Here is an example: http://jsfiddle.net/2hdt4795/1/
Open it and write some input to the combo box, you will see that the correct string is logged
It is your task to get the right data.Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.