jQWidgets Forums
jQuery UI Widgets › Forums › Grid › cellclick broke with latest version of chrome and jqxgrid 2.x
Tagged: grid dynamic loading
This topic contains 8 replies, has 4 voices, and was last updated by admin 11 years, 5 months ago.
-
Author
-
Hello,
I am wondering if anyone else has seen them problem with version 2 (jQWidgets v2.7.0 (2013-Feb-08))
My chrome updated to 32.0.1700.72 and my grid broke. So far what i have found is the cellclick event does not work and the row highlight does not work. Works fine with ie and FF (I have tried chrome on win7 and xp with the same results)I can not upgrade to the latest version of the grid, because version 3 complete breaks if you load the grid dynamically via ajax in a single page app.
just wondering if anyone else is seeing this problem and if they have figured out a fix
Thanks
randyHi paries,
version 2.7 does not support Chrome 32 and the Grid will not break if you load it dynamically and use it correctly. If you experience some issue with jqxGrid, then post a sample which demonstrates it so we can see what is wrong on our side or on your side.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Peter, thanks for responding.
this is in a very large app , so i will try to provide some
If i simply replace the 2.7 version with the 3.1 version , when the page loads(that used to work) i get
#jqxgrid! Please, check whether the used ID or CSS Class name is correct.in the jQuery(document).ready(function($) i load via ajax the html that contains the div with the id of jqxgrid
i then tried in the html to add a temp div to middiv which is where the dynamic content is being loaded. So when the dynamic code gets loaded , the jqxgrid will get replaced with new html that includes the real jqxgrid div. This kindof worked, the grid loaded with the correct amount of rows, but the table labels did not populate and the cellclick no longer worked.
<div id="main-container" class="row-fluid"> <div id="middiv" class="row-fluid"> <div id="jqxgrid"></div> </div> </div>
I hope this is enough information
Thanks
I did find in my init, if i added
if ( jQuery('#jqxgrid').length > 0 ) { jQuery('#jqxgrid').jqxGrid('clear'); }
that i no longer got the #jqxgrid! Please, check whether the used ID or CSS Class name is correct.
but the cellclick still no longer works
$('#main-container').on('cellclick', '#jqxgrid', function (event){ console.log("Cell clicked"); });
Hi paries,
Have you tried with: $(“#grid”).on(“cellclick”, function(event){// your code}); i.e as shown in the docs.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/I just tried it again and no joy. I think i did it originally this way
$('#main-container').on('cellclick', '#jqxgrid', function (event){ console.log("Cell clicked"); });
because the page is being loaded dynamically…
Hi paries,
When you attach the event handler, you will have to make sure that the Grid’s DIV tag is there, too and attach the handler to the Grid’s DIV tag.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Paries,
Verify that you are indeed using jqWidgets 3.1… we saw the same issue with a prior version and just verified the issue is not present in 3.1.
See this jsfiddle that shows it working under 3.1.
http://jsfiddle.net/ericwastaken/x6nd5/
Good luck!
Eric.
-
AuthorPosts
You must be logged in to reply to this topic.