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[^]