javascript - handle click event on button with jQuery in dhtmlx grid after smart rendering -
javascript - handle click event on button with jQuery in dhtmlx grid after smart rendering -
i'm generating dhtmlx grid has show big dataset (+ 2k rows). in lastly column of grid there 3 buttons defined html.
i'm handling "click" event on buttons jquery :
$("button.edit").on("click", function() { stuff ... });
first seek set jquery code normal way :
$(document).ready(function() { ...}
this not working set jquery in event "onxle" of grid construction
mygrid.attachevent("onxle", function() { $("button.edit").on("click", function() { stuff ... }); })
this working fine because it's big dataset , due network performance decided utilize smartrendering method of grid.
mygrid.enablesmartrendering(true);
the problem i'm facing buttons on first records work charm when scroll downwards , more records rendered buttons these records don't work anymore.
has solution on ?
thx.
my clue must attach function of yours on event 'ondataready'.
usage according dhtmlx docs: "fires when info loaded grid hasn't been rendered yet"
mygrid.attachevent("ondataready",function(){ // code here });
i think pretty much need.
javascript jquery dhtmlx
Comments
Post a Comment