Javascript in Grid

Introduce Javascript support in Grid as first class citizens .
In Form apps it is possible to define Javascript functions and use them in various events.
In Grid the only way to use Javascript is echoing

<script>....</script>

I am also trying to find out a way to use javascript in grid applications