javascript for checkbox checked
<p>Sample of what I need: (click for full image)</p>

<p><a href="http://i.stack.imgur.com/czyQI.png" rel="nofollow"><img src="http://i.stack.imgur.com/czyQI.png" alt="sample"></a></p>

<p>I want that when I click on any of the header checkbox, all the rows below that will be checked.</p>

<p>For example: when I click on <em>select all</em> checkbox of header then all the checkbox shown in grid must be checked and vice versa. Also when I click on any select row checkbox than that particular row must be selected.</p>

<p>Also I have child and parent node as admin has role wise menu and role details then clicking on cell[1][1] that is admin row first cell, then it should check or uncheck its child node too.</p>
