if (chkAll.Checked)
{
if (!array.Contains(gridview.DataKeys[i].Value))
array.Add(gridview.DataKeys[i].Value);
}