jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Checkbox Filter – Strange Behavior
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 11 years, 6 months ago.
-
Author
-
I am using a checkbox filter for one of my grids and it has started showing some strange behavior:
When the grid is initially loaded the checkbox filter is in it’s indeterminate state (like it should be),
1.) then when I click the checkbox it goes to unchecked,
2.) another click on the checkbox makes it checked,
and here’s where the error occurs,
3.) on the third click of the checkbox I SHOULD see that it’s back in its indeterminate state however the checkbox remains checked. The strange part is that the filter is working properly! on the third click the filter is removed and the checkbox is essentially in its indeterminate state but it shows that it’s checked.
My bigger problem is that I can not isolate and reproduce the problem, when I copy/paste the code for my grid onto a separate test page the problem disappears, I can’t see why it would only happen when included in my app. All my filter’s are working properly it just seems that the grid is not loading/showing the indeterminate graphic (little black square). Do you know of any reason this could be happening?
Here’s the code for my grid:
var someSource = { url: "someURL.php", data: { action: 'someAction' }, datatype: "json", datafields: [ { name: 'is_approved', type: 'bool' }, { name: 'payroll_processed', type: 'bool' } ] } var someDataAdapter = new $.jqx.dataAdapter(someSource); $("#Grid").jqxGrid({ theme: theme, height: 800, width: 1420, source: someDataAdapter, columnsresize: true, columnsreorder: true, filterable: true, showfilterrow: true, sortable: true, editable: true, editmode: 'dblclick', selectionmode: 'singlerow', columns: [ { text: "Approved", datafield: 'is_approved', columntype: 'checkbox', filtertype: 'bool', width: 80 }, { text: "Payroll", datafield: "payroll_processed", columntype: 'checkbox', filtertype: 'bool', width: 80 } ] });
Hi aoverton07,
The reason could be: missing images in the jqwidgets/styles folder on your side.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Peter,
I thought that might be the case but the check_indeterminate_black.png is present in the styles/images folder and on top of that it is loaded and visible when the grid is initialized. Like I said, the filtering is working properly it just seems that it will not reload/show the black square for the indeterminate state….
Hi aoverton07,
Then, I would suggest you to check whether the problem comes from another script. It that is not the reason, you can post a sample which reproduces the behavior and which we can test locally.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Peter,
I found the root cause of the problem. It came from including and using an old version of jqueryui version 1.9.2 I’m not sure why that version would cause a conflict in the code because I thought that jqWidgets only uses jquery, NOT jqueryui. Anyway, updating jqueryui seems to have fixed this error. Thanks!
Hi aoverton07,
We do not use jQuery UI and in general our code does not have conflicts with it. However, as far as I know, old versions of jQuery UI have small compatibility issues with some versions of the jQuery Framework in such way that jQuery UI affects the jQuery’s removeClass(ex: http://bugs.jqueryui.com/ticket/9015), addClass which we use in jQWidgets. Sorry, but when we use jQuery functions that work and some other third party library breaks them for some unknown reason, I do not think that we can do anything about.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.