如何在asp.net listview中显示一行和一列? [英] how to display one row and one column in asp.net listview?

查看:209
本文介绍了如何在asp.net listview中显示一行和一列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将数据源绑定到列表视图控件,并希望一次显示一行.怎么可能,我已经准备好将GroupItemCount属性全部设置为1,但是列表视图显示列表中所有行的列表..

I bind data source to list view control and want to display one row at a time. How is it possible, I have all ready set GroupItemCount property to 1, but list view displaying all the rows one by one in list..

推荐答案

GroupItemCount属性用于设置每个组的项目数.如果只想显示一个项目,则只需将一个项目绑定到gridview即可,或者可以一次显示一个项目来进行分页.
GroupItemCount property is for setting the number of Items per Group. If you want to show only one item, you just bind one item to gridview or you can go for paging with displaying one item at a time.


尝试GridView分页(并设置PageSize = 1):)
Try GridView paging (and set PageSize = 1) :)


我正在使用ListView而不是GridView.我正在创建一个在线检查页面,并希望在ListView中显示一个带有其选项的问题,并在单击下一步时显示另一个问题.但是,ListView像列表一样一一显示所有行.
I am working with ListView not GridView. I am creating an online examination page and want to show one question with its options in ListView, and want to show another question on next button click. But, the ListView showing all rows one by one just like list.


这篇关于如何在asp.net listview中显示一行和一列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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