I have a grid and I wanted to use .bind and .unbind to handle events, but I can't seem to get bind to work.
If I do:
grid.igGrid({ dataRendered: function () { handleRendered(); } });
handleRendered will get called.
grid.bind("dataRendered", function () { handleRendered(); } });
handleRendered will not be called.
Now, obviously I want to bind and unbind the same function, but I did this to demonstrate the failure. Am I doing something wrong? In both cases, grid is the same $(selector)...
Am I missing something?
Hi, Pete.
You are welcome.
Best regards, Nikolay Alipiev
Thanks Nikolay. That worked perfectly, of course... I'm still learning my way around jQuery and Ignite... Thanks for the helping hand.
Please follow this link to the igGrid API documentation, to see how to attach to grid events using "bind" ("delegate" or "on").
What you need to do is to use the full path of the event, following the jQuery UI convention - name of the control + name of the event:
grid.bind("iggriddatarendered", function () { handleRendered(); } });