jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Chckbox Selection is not working with server side filtering
Tagged: Selection mode checkbox
This topic contains 4 replies, has 2 voices, and was last updated by Shiva shankar. C 10 years, 11 months ago.
-
Author
-
Hi Guys,
Am using JQxgrid latest version which is available in in this site,
am using demo: http://www.jqwidgets.com/jquery-widgets-demo/demos/php/serverfiltering_paging_and_sorting.htm?arctic to implement server paging, sorting and filtering correctly.
with this sample after filtering if i click on checkbox to select it not selecting the row<!DOCTYPE html> <html lang="en"> <head> <title id='Description'>In this example is demonstrated how to implement server filtering, sorting and paging with jqxGrid.</title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.pager.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="../../scripts/demos.js"></script> <script type="text/javascript"> $(document).ready(function () { // prepare the data var source = { datatype: "json", datafields: [ { name: 'ShipName', type: 'string'}, { name: 'ShipAddress', type: 'string' }, { name: 'ShipCity', type: 'string' }, { name: 'ShipCountry', type: 'string' } ], cache: false, url: 'serverfiltering_paging_and_sorting_data.php', filter: function() { // update the grid and send a request to the server. $("#jqxgrid").jqxGrid('updatebounddata', 'filter'); }, sort: function() { // update the grid and send a request to the server. $("#jqxgrid").jqxGrid('updatebounddata', 'sort'); }, root: 'Rows', beforeprocessing: function(data) { if (data != null) { source.totalrecords = data[0].TotalRows; } } }; var dataadapter = new $.jqx.dataAdapter(source, { loadError: function(xhr, status, error) { alert(error); } } ); // initialize jqxGrid $("#jqxgrid").jqxGrid( { source: dataadapter, filterable: true, sortable: true, autoheight: true, pageable: true, virtualmode: true, selectionmode: 'checkbox' rendergridrows: function(obj) { return obj.data; }, columns: [ { text: 'Ship Name', datafield: 'ShipName', width: 200 }, { text: 'Address', datafield: 'ShipAddress', width: 180 }, { text: 'City', datafield: 'ShipCity', width: 100 }, { text: 'Country', datafield: 'ShipCountry'} ] }); }); </script> </head> <body class='default'> <div id="jqxgrid"></div> </body> </html>
Hi Shiva shankar. C,
please, make sure that you use jQWidgets 3.4 on your side.
Best Regards,
Peter StoevThanks for response,
Yes am using jQWidgets 3.4 onlyHi Shiva shankar. C,
Ok, if you do not like the Grid’s behavior with Checkbox selection mode, you can use any of the other selection modes.
Best Regards,
Peter StoevHi Peter,
is checkbox not selecting is a default behavior of checkbox selection mode! or is it is bug?
If it is bug please take this issue as consideration for the fix in next release.
-
AuthorPosts
You must be logged in to reply to this topic.