计算具有相同值的行的gridview行 [英] count gridview rows for rows that have same value

查看:71
本文介绍了计算具有相同值的行的gridview行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好...
有人可以帮我吗...我在SharePoint 2010中是新手
我想使用c#visual Studio 2010为我的列表创建视图
我已经使用SPQuery
对列表进行了排序 我的gridview输出如下所示...


1 b
ID 答案
a
      b
  c
2 a
  a
 
  c


但是,我希望gridview查看类似这样的项目


1 总数b:2
ID 答案
总计a:2
 
  总数c:1
2 总计a:2
  总数b:1
 

Hello...
can anybody help me...i''m new in sharepoint 2010
i want to create a view for my list using c# visual studio 2010
i''ve already sort the list using SPQuery
my gridview output is like below...


ID Answer
1 a
  a
  b
  b
  c
2 a
  a
  b
  c


but, i want the gridview view the items like this


ID Answer
1 Total a: 2
  Total b: 2
  Total c: 1
2 Total a: 2
  Total b: 1
  Total c: 1



please help me..
thank you..
~Laili~

推荐答案

一些回答您问题的线程.
1) http://social.msdn.microsoft. com/Forums/en-US/winformsdatacontrols/thread/25bc9188-61a6-4f7b-97ae-03164b558ee1 [ http://forums.asp.net/t/1153938.aspx [
Some threads that answer your question.
1) http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/25bc9188-61a6-4f7b-97ae-03164b558ee1[^]
2) http://forums.asp.net/t/1153938.aspx[^]

You could also do this by writing the query in such a way that will include the result count.


这篇关于计算具有相同值的行的gridview行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆