jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Search server side call
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 5 years, 8 months ago.
-
AuthorSearch server side call Posts
-
Hi again,
I’m looking at this example and trying to send data server side but I get this “jqxGrid: The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler.”
grid.on("bindingcomplete", function (event) { loading = false; grid.jqxGrid('localizestrings', localizationobj); $("#findButton").click(function () { if (loading === false) { loading = true; var filtervalue = $("#inputField").val(); grid.jqxGrid('clearfilters'); var searchColumnIndex = $("#dropdownlist").jqxDropDownList('selectedIndex'); var datafield = ""; switch (searchColumnIndex) { case 0: datafield = "can_country_id"; break; case 1: datafield = "name_gr"; break; case 2: datafield = "name_en"; break; case 3: datafield = "name_bg"; break; case 4: datafield = "name_tr"; break; case 5: datafield = "name_ro"; break; } var filtergroup = new $.jqx.filter(); var filter_or_operator = 1; var filtercondition = 'contains'; filter = filtergroup.createfilter('stringfilter', filtervalue, filtercondition); filtergroup.addfilter(filter_or_operator, filter); grid.jqxGrid('addfilter', datafield, filtergroup); grid.jqxGrid('applyfilters'); } }); });
It posts with the wrong form data
Is this the correct way? can you please give me an example with ajax call?Hello andreopmaria,
If you want to have initial filtering you could add the filter in the
ready
callback and also here which is fine.
Please, take a look at this demo:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/initialfilter.htm?lightAbout the Server-Side Filtering I would like to suggest this tutorial:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-filtering.htm?search=
This one for CRUD operations and AJAX will be helpful for you I think:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-crud.htmAlso, please, take a look at this demo, too:
https://www.jqwidgets.com/jquery-widgets-demo/demos/php/serverfiltering.htm?light
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.