留下EMAIL,我发一个控件给你...自动计算数值类型的汇总.
解决方案 »
- Access 2010 如何链接?
- .net2005 Table或控件 height=%100不起作用.
- Fileupload的问题。
- 有新问题,希望大家给出解决方案,先谢谢大家了
- 如何在asp.net中对foxpro数据库插入时间------在线等待中
- asp.net中发布重要word文档的解决方案
- 请教高手:是否可以在服务器控件中显示htm页的内容
- DataList 动态更新问题,和数据显示问题
- 提问 ,什么才是支持动态updatecommand生成的select 语句
- 好多人遇到这问题却都没有解决方案,求高手指点!!!同一个用户控件在一个页面多次调用,取值混乱(附有代码和截图)
- 请教DropDownList的OnSelectedIndexChanged事件无法触发的问题,分不够再加
- 急,在线等待解决:datagrid中的模板列中有"dropdownlist子控件dlLine",如果dlLine的SelectedIndexChanged改变时我想改变第二列的值为dlLin
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
int dd = 0;
for(int i= 0;i<DataGrid1.Items.Count;i++)
{
dd += int.Parse(DataGrid1.Items[i].Cells[6].Text.ToString());
}
DataGrid1.Columns[6].FooterText = dd.ToString();
}
页脚要显示才行
If (e.Item.ItemType = ListItemType.Footer) Then
e.Item.Cells(19).Text = "累计: "
e.Item.Cells(19).HorizontalAlign = HorizontalAlign.Right
oTextbox.Width = New Unit(100, UnitType.Pixel)
oTextbox.Text = GetTotalPrice()
e.Item.Cells(20).Controls.Add(oTextbox)
End If
End Sub'累计
Function GetTotalPrice()
Dim TotalPrice As Double
Dim CmdDataCount As OleDbCommand
cnn.Close()
cnn.Open()
CmdDataCount = New OleDbCommand("SELECT SUM(mlr) FROM alldata where(cbflag='1') and (zfflag='0') ", cnn)
TotalPrice = CmdDataCount.ExecuteScalar()
cnn.Close()
Return (TotalPrice)
End Function