Chkbox Controls in a DataGrid Header
Below I have ChkBoxes in a datagrid and it can pull the items out with the DataGridItem collection. But how do I get the value a check box in the HEADER of a data grid. I tried the DataGridColumns collection but not to much success.
foreach (DataGridItem dataGridItem in dgProject.Items)
{
bool chkHello = ((CheckBox)dataGridItem.FindControl("chkHello")).Checked;
bool chkBye = ((CheckBox)dataGridItem.FindControl("chkBye")).Checked;
if (chkHello)
{myArray.Add( new myArrayItem(dataGridItem.Cells{2].Text , "Hello"));}
if (chkBye)
{myArray.Add( new myArrayItem(dataGridItem.Cells{2].Text , "Bye"));}