Check All CheckBoxes in a GridView Using Client Side Javascript
by David Hayden ( Microsoft MVP C# ), Filed: ASP.NET 2.0
Spent a few moments this weekend updating the administrative area of PnPGuidance and dogfooded a lot of controls from WCSF, including the RealTimeSearchMonitor and ObjectContainerDataSource Controls. Everything is written using Model View Presenter and I wrote a quick tutorial this evening just how important the ObjectContainerDataSource Control is when using the the GridView Control with MVP:
One of the things I wanted to do on the GridView of a few pages is have a checkbox in the header that would allow me to select or unselect checkboxes in all the rows of the GridView. Here is a partial snapshot of a GridView with such a configuration:

I wanted to be able to do it using client-side Javascript, however, as opposed to causing an Asynchronous Postback in the UpdatePanel for such a trivial task. Something tells me I would have been chewing on that problem a bit if it weren't for Scott Mitchell's excellent article on the subject with downloadable source code:
Scott is the man, however, as he obviously went through a bit of trial and error getting the UI just right and all I had to do was copy and paste ( evil development practice ) for the most part. Credit where credit is due and I very much appreciated the article.
Given that the article is from 2006, I am curious as to whether there is an alternative method that is easier or more accepted now, but it works perfect.