手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >asp.net Gridview里添加汇总行
asp.net Gridview里添加汇总行
摘要:if(e.Row.RowType==DataControlRowType.DataRow){totalcash+=Convert.ToDec...

if (e.Row.RowType == DataControlRowType.DataRow)

{

totalcash += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "cash"));

totalunbalanced += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "unbalanced"));

totalsettled += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "settled"));

}

else if(e.Row .RowType ==DataControlRowType .Footer )

{

e.Row.Cells[0].Text = "合计";

e.Row.Cells[1].Text = totalcash.ToString("0.00");

e.Row.Cells[2].Text = totalunbalanced.ToString("0.00");

e.Row.Cells[3].Text = totalsettled.ToString("0.00");

e.Row.Font.Bold = true;

}

【asp.net Gridview里添加汇总行】相关文章:

asp.net 文件上传实例汇总

asp.net(c#) 水仙花数

asp.net如何在图片上加水印文字具体实现

asp.net上传execl文件后,在页面上加载显示

asp.net gridview强制换行

asp.net发邮件的几种方法汇总

asp.net SqlParameter如何根据条件有选择的添加参数

asp.net下Response.ContentType类型汇总

asp.net(C#) 生成随机验证码的代码

gridview 行选添加颜色和事件

精品推荐
分类导航