public void SelectAll()
{
if (SelectionMode.Equals(ListSelectionMode.Multiple) && AllowSelectAll)
{
foreach (GridViewRow item in ((GridView) Control).Rows)
{
HtmlInputCheckBox checkselector = item.FindControl("RowSelectorColumnSelector") as HtmlInputCheckBox;
checkselector.Checked = true;
}
selectAllControl.Checked = true;
}
}