本文介绍了如何在ASP.NET中将ListView与分组一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在不使用数据库的情况下将listview与asp中的分组一起使用? 请给我发送代码...
how to use listview with grouping in asp?without using database? please send me the code...
推荐答案您需要为ListView定义 GroupTemplate ,还必须将值设置为 GroupItemCount 属性. 具有数据库不是强制性的,但是它必须需要一个DataSource才能从中获取要显示的数据. 请参考这些链接- ListView.GroupTemplate [ ^ ] 在ListView控件中对数据进行分组 [ ^ ] 在ASP.Net ListView控件(标题显示)中使用GroupTemplate [ ^ ] 您需要做的唯一更改是,不提供SQL数据源,而只是提供要从中构建ListView的数据源. 希望对您有帮助:) 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与分组一起使用?
发布评论