Code:/** // <summary>
/// Bind data
/// </Summary>
/// <Param name = "sender"> </param>
/// <Param name = "E"> </param>
Protected void gridviewxinxilan_rowdatabound (Object sender, gridviewroweventargs E)
...{
If (E. Row. rowtype = datacontrolrowtype. datarow)
...{
Totalstock + = convert. todecimal (databinder. eval (E. Row. dataitem, "actual production volume this year "));
}
Else if (E. Row. rowtype = datacontrolrowtype. footer)
...{
E. Row. cells [1]. Text = "Statistics ";
E. Row. cells [1]. horizontalalign = horizontalalign. Right;
E. Row. cells [4]. Text = totalstock. tostring ();
E. Row. cells [4]. horizontalalign = horizontalalign. Right;
}
}
/** // <Summary>
/// Modify data
/// </Summary>
/// <Param name = "sender"> </param>
/// <Param name = "E"> </param>
Protected void buttonload_click (Object sender, eventargs E)
...{
// Modify data
Gridviewxin#an. Rows [5]. cells [4]. Text = "test ";
Gridviewxin1_an. footerrow. cells [4]. Text = "statistical test ";
}