知足常乐,享受生活

2005年12月19日

摘要: 1.DataSet中某个列值的计算 Dim dt as Datatable=ds.tables("Product") Dim sum as int32 = dt.Compute(" sum( 单价)", "单价>0") 每次只能对一个列使用Compute方法,除了Sum(),还可以用Avg() Compute方法的第一个参数包含聚合表达式。第二个参数限制使用条件。其中条件可... 阅读全文
posted @ 2005-12-19 17:54 OnlyLiu 阅读(165) 评论(0) 推荐(0) 编辑
 
摘要: .对DataGrid中的每一行、每一列轮询一遍 Dim item As DataGridItem //行 Dim colCount As Integer = MyDataGrid.Columns.Count - 1 //列数 For Each item In MyDataGrid.Items For i=0 To colCount if Item.Cells(i).T... 阅读全文
posted @ 2005-12-19 17:51 OnlyLiu 阅读(168) 评论(0) 推荐(0) 编辑