protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//1~10
//if (e.Row.RowIndex >= 0)
//{
// e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
//}
if (e.Row.RowIndex != -1)
{
int indexID = this.GridView1.PageIndex * this.GridView1.PageSize + e.Row.RowIndex + 1;
e.Row.Cells[0].Text = indexID.ToString();
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView _row = (DataRowView)e.Row.DataItem;
_sum += Convert.ToDouble(_row["CheckFee"].ToString());
}
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[8].Text = _sum.ToString();//合计CheckFee列
}
}