分组的GridView [英] Grouped Gridview

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

问题描述

我在转换一个访问的DB到Web应用程序的过程。在Access数据库目前生产使用分组,例如报告:

I am in the process of transitioning an Access DB to a Web application. The Access DB currently produces reports using grouping e.g.:

Country
-------------------------------------------------------
County
-------------------------------------------------------
City Name | Population | Post Code |

我试图重现此使用asp.net。我想我可以手动code一张桌子要做到这一点,但似乎应该有一个更好的办法。通过外观上来看,这是不可能用一个GridView,没有很多黑客的。我原以为一个ListView会做我想做的,但似乎在分组只允许您按记录的数量,而不是由一个父字段。

I'm trying to reproduce this using asp.net. I guess I could manually code up a table to do this, but it seems like there should be a better way. By the looks of it this is not possible with a Gridview, without alot of hacking. I had thought a listview would do what I want, but it seems the grouping in that only lets you group by number of records, not by a parent field.

反正是有使用.NET控件来做到这一点,或我应该集中在一张桌子和code在aspx页面做手工。

Is there anyway to do this using a .net control or should I be concentrating on doing it manually with a table and code in the aspx page.

推荐答案

我已经成功使用列表视图得到一个解决方案,这是一个黑客位,但它工作得很好。请参见此页细节。

I've managed to get a solution using a list view, it's a bit of a hack, but it works well. See this page for details.

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

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