I've got a table which has buttons in some of the cells, and I want to bind javascript functions to the buttons.
If I create a parameterless javascript function, and set the table gridcomplete to this function, then everything works fine – when the grid data has been loaded into the DOM, the gridcomplete event fires, my function is called, my buttons get their click handlers attached, and everything is good.
If I create a javascript function which takes a parameter (e.g. the table ID, when I have multiple tables on a page), and set the table gridcomplete to this function with a parameter (e.g. gridcomplete: bindIcons(“table1”)), the gridcomplete event fires before the data has been loaded into the grid, so the buttons don't exist yet, and the click handlers do not get attached. An alert dialog in my bindIcons function shows that the function does get called, and the parameter gets passed just fine – it just gets called too early!
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top