jQuery UI Widgets › Forums › General Discussions › Lists › DropDownList › Remote Filtering using jqxDropDownList
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 10 years, 9 months ago.
-
Author
-
Can I override the filter method or atelast hook up an event handler to the jqxDropDownList each time the filter is changed and how to get the filter value ?
Basically I want to do remote filtering. This is what I have. I want a method to get the “filter” string and want a way to rebind the data when the filter changes.
$widgetDropDownList.jqxDropDownList({
source: dataAdapterDropDownList, // my data adapter where I have overiden the loadServerData method
filterable: true,
displayMember: ‘text’,
filterPlaceHolder: ‘Enter at least 3 characters’,
placeHolder: ‘Select a Category’
});_createDataSource: function(searchStringFunc, remoteDataFunc) {
var source = {
datatype: ‘json’,
url: ‘hack’,
filter: function() {
console.log(‘Here I am’ + arguments);
}
},
dataAdapter = new $.jqx.dataAdapter(source, {
loadServerData: function(params, source, callback) {
var searchString = searchStringFunc();
if (searchString && searchString.length > 0) {
remoteDataFunc(searchString, {
success: function(data) {
callback({
records: data,
totalrecords: data.length
});
},
error: function(error) {
console.log(error);
callback({
records: [],
totalrecords: 0
});
}
});
} else {
callback({
records: [],
totalrecords: 0
});
}
}
});
return dataAdapter;
},Hi subramgr,
Sorry, but overriding the Filtering is not supported.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.