Some clarification on the code ...
The render script runs once when the grid is initially rendered. It won't run again unless the container of the grid is refreshed. e.g. refreshing your browser.
Having said that, when the render script runs the single time, the JS code "sets up" an event handler for the dataBound event of the grid that fires every time data is loaded into the grid even if that's zero records.
One way or another, what you want can be accomplished. It will take being able to see your specific configuration and use case.