SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to add one column which has a unchecked checkbox in it. This is used so the user can select multiple rows.

datatable.Columns.Add(new DataColumn("Selected", typeof(bool)));

if above datatable is used in a normal DataGridView it shows a checkbox instead of a bool. However when used in a SPGridView it will just show me true/false.

datatable.Columns.Add(new DataColumn("Selected", typeof(CheckBox)));

Above datatable shows System.Web.UI.WebControls.CheckBox instead of the checkbox or the true/false value.

So how van i create a column which only shows a checkbox in each row. And how can i add a CheckBox to the column header so the user can select that one for all rows in the SpGridView.

share|improve this question
up vote 0 down vote accepted

Check link below. It Shows How to add Check box in SPGridView.

and check this link which shows that how to add header Check box in SpGridView.

CheckBox header to select all checkBoxes in SPGridView

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.