Displaying the check box in a data table or page block table is a general requirement in every project. with the help of wrapper class we can display the checkboxes in a data table. SrinivasaRao Pendala writes a simple and neat article on how to generate checkboxes in data table.

Also added in the code is small javascript so that if we select the header checkbox it will select all the checkboxes.

Read complete article @ Salesforce Wiki