如何在ASP.NET中将ListView与分组一起使用? [英] how to use listview with grouping in asp.net?

查看:199
本文介绍了如何在ASP.NET中将ListView与分组一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用数据库的情况下将listview与asp.net中的分组一起使用?
请给我发送代码...

how to use listview with grouping in asp.net?without using database?
please send me the code...

推荐答案

您需要为ListView定义 GroupTemplate ,还必须将值设置为 GroupItemCount 属性.
具有数据库不是强制性的,但是它必须需要一个DataSource才能从中获取要显示的数据.
请参考这些链接-
ListView.GroupTemplate [ ^ ]
在ListView控件中对数据进行分组 [ ^ ]
在ASP.Net ListView控件(标题显示)中使用GroupTemplate [
You need to define GroupTemplate for your ListView and also have to set a value to GroupItemCount property.
It is not mandatory to have a database but it must need a DataSource from which it will get data to display.
Please refer these links-
ListView.GroupTemplate[^]
Grouping Data in the ListView Control[^]
Using GroupTemplate in ASP.Net ListView Control(Tiled Display)[^]

The only change you need to do is, instead of providing SQL datasource you just provide your datasource from which you want build the ListView.

Hope, it helps :)


这篇关于如何在ASP.NET中将ListView与分组一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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