何必这么复杂呢,就用个SQL语句就行了, select unit*price from *** as unprice 绑定到DATAGRID就行了
"select cname,color,unit,unitprice from parts where code='" & bh & "' union select '' as cname,'' as color,'' as unit,sum(unitprice) as unitprice form parts where code='" & bh & "'"
select unit*price from *** as unprice
绑定到DATAGRID就行了