ASP.NET: GridView:, Get CheckBox value

In the GridView add the CheckBoxField:
<asp:CheckBoxField DataField=”STUD_Induction” HeaderText=”Induction”
            SortExpression=”STUD_Induction”/>
In the code file get the value of the CheckBoxField:
string chkInduction = ((CheckBox)studentListGridView.Rows[e.RowIndex].Cells[5].Controls[0]).Checked.ToString();
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s