Hi,
some times we have a requirement like selecting all row items of grid by checking the header checkbox. I am posting the link with source code attachment to achieve this functionality by using javascript code.
http://www.highoncoding.com/Articles/228_GridView_CheckBox_Selection_With_a_Twist.aspx
Thanks,
Ratna