保護されたボイドgviewEmployees_RowDataBound(オブジェクト送信者、GridViewRowEventArgs E)
{
IF(e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add( "れるonmouseout"、 "this.style.backgroundColor = \" \ "");
e.Row.Attributes.Add( "onmouseover属性"、 "this.style.backgroundColor = \" #のBFDFFFの\ "");
テキストボックスTXT =(テキストボックス)e.Row.Cells [3] .FindControl( "txtOrderNum")。
SumConsume + = Convert.ToSingle(e.Row.Cells [2] .Text.ToString()サブストリング(1))* Convert.ToSingle(txt.Text)。
}
IF(e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cellsの.text = "あなたの総消費量:" [4] + String.Formatの( "{0 :C}"、Convert.ToDecimal (SumConsume.ToString()));
}
}
ます。https://www.cnblogs.com/zhangchenliang/archive/2008/01/08/1029669.htmlで再現