本文介绍了按数据表分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI Friends


我想将gridview导出为ex​​cel.我正在将数据从SQL检索到datatable,然后绑定到gridview,我想要的是我想根据货币将dt中的行分组,并找到这些行的总值.

EG

< u>名称货币金额</u>

INR 100
B AUD 25
INR 5
D EUR 30

上面的是datable,我想要dt这样的


INR 100
INR 5
105
-----------------------------
B AUD 25
25
-----------------------------
D EUR 30
30
-----------------------------
就像他想要的那样,必须将其导出到excel

可以帮助您解决方案



HI Friends


I want to export gridview to excel. I''m retrieving data from SQL to datatable , thn binding to gridview , What i want is I want to group the rows in dt based on currency and find the total value of that rows.

EG

<u>Name Currency Amount</u>

A INR 100
B AUD 25
C INR 5
D EUR 30

the above one is the datable and i want the dt as this


A INR 100
C INR 5
105
-----------------------------
B AUD 25
25
-----------------------------
D EUR 30
30
-----------------------------
like this iwant he dt and have to export this to excel

ANy help wil b appreciated

解决方案



这篇关于按数据表分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 02:54