一列的总数就是这个表中的总行数,sql语句:
select count(1) from table
lable value=列1+列2+列3+列4+列5+列6
Decimal dTotal = 0;
foreach(DataGridViewRow row in dgv.Rows)
{
dTotal += decimal.parse( row(10) );
}
lbl.Text = dTotal;
dataset ds="数据源";
double num=0;
for(int i=0;i
num+=convert.todouble(ds.tables[0].rows[i]["列名"]);
}
lable1.text=num.tostring();