if (chkAll.Checked)
{
if (!array.Contains(gridview.DataKeys[i].Value))
{
array.Add(gridview.DataKeys[i].Value);
}
}
This is to add the row of a gridview to the ARRAY if the checkbox is checked.
What will be the code if I work with DATATABLE instead of GRIDVIEW.