GetRowsCountByTargetColumn
public int GetRowsCountByTargetColumn(GridView gv, int targetColumnIndex, string targetColumnValue) {
bool ap = gv.AllowPaging;
if(ap)
gv.AllowPaging = false;
int count = 0;
foreach(GridViewRow row in gv.Rows) {
if(row.Cells[targetColumnIndex].Text.Equals(targetColumnValue))
count++;
}
if(ap)
gv.AllowPaging = true;
return count;
}