Gridview数据处理 [英] Gridview data manipulation
本文介绍了Gridview数据处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的数据库结构如下:
状态数据计数
取消2010-11-06 [20]
完成2010-12-06 [30]
我想像下面的结构一样在gridview中显示以上数据
状态取消完成
2010-11-06 [20]-
2010-12-06-[30]
如果有人对如何实现此想法有所了解,请分享.
谢谢
My Database structure is as follow:
Status dat count
Cancel 2010-11-06 [20]
Complete 2010-12-06 [30]
I want to show the above data in gridview like below structure
Status Cancel Complete
2010-11-06 [20] -
2010-12-06 - [30]
If anyone has an idea of how to implement this, then please share.
Thanks
推荐答案
如果您使用的是SQL Server,则可以使用数据透视表.
http://www.kodyaz.com/article/t-sql-pivot-tables-in-sql-server-tutorial-with-examples.aspx [
You could use a pivot table if you''re using a SQL Server.
http://www.kodyaz.com/articles/t-sql-pivot-tables-in-sql-server-tutorial-with-examples.aspx[^]
这篇关于Gridview数据处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文