jQuery UI Widgets › Forums › General Discussions › Feature: gridRendered (including all cellrenderes)
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 4 months ago.
-
Author
-
Hello,
I would really appreciate an event when the grid is fully (and by that I mean including all cells with cellrenderes) rendered, so I could for example add click events to html-containers inside of cells.
Thank you,
WitoldHi Witold,
Unfortunately, such approach would be wrong. There is cellclick event raised when a cell is clicked since the release of jqxGrid. Also jqxGrid may have thousands of cells and just several HTML Cell elements, because of the virtualization process. It is not smart to add and render all HTML Cell Elements when this is not necessary. Hope this answers your feature request.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comWell, in this special case I was adding a dropzone for an file-upload into a cell and had to add the behaviour to the html-element, which would not work with cellclick-Event at all.
I helped myself with this:
$("#jqxgridBestand").jqxGrid( { ready: gridReallyRendered }); var gridReallyRendered = function() { if ($('.drop').length < $('#jqxgridBestand').jqxGrid('getrows').length) { setTimeout(function () { gridReallyRendered() }, 200); return; } ... }Hi Witold,
I don’t want to dissapoint you but that workaround will not work in many cases and especially after the grid is re-rendered for some reason or you scroll up/down.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comSo, what is your suggestion how to have a html-element inside a cell which should have some jquery-magic?
Thanks,
WitoldHi Witold,
See: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customwidgetscolumn.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.