0
未处理的,然后会出现以下错误:System.ArgumentOutOfRangeException是由用户代码
System.ArgumentOutOfRangeException是由用户代码未处理。指定的参数超出了有效值的范围。参数名:索引
错误发生在下面这被注释掉行:
private void helper_GeneralSummary(GridViewRow row)
{
double HoldingDays = Convert.ToDouble(row.Cells[6].Text);
double AbsReturn = Convert.ToDouble(row.Cells[7].Text);
double AnnReturn = (AbsReturn/HoldingDays) * 365;
row.Cells[8].Text = AnnReturn.ToString("#,0.00"); //Error occured
}
显然,GridView中没有9列。 –
你知道第一个单元格是'row.Cells [0]'? –
尝试调试和检查对象值,它会使得更容易得到答案 – Tamir