简体   繁体   English

C# listview分页问题

[英]C# listview paging question

In Listview, if I want to use the paging feature, how can i increase the amount of rows shown for each page?在 Listview 中,如果我想使用分页功能,如何增加每页显示的行数? I would like to increase the current rows form say 10 to 35.我想将当前行从 10 增加到 35。

Use the PageSize property as in:使用PageSize属性,如下所示:

<asp:GridView runat="server" AllowPaging="True" PageSize="25">

EDIT编辑
I just saw that you're talking about ListView .我刚刚看到您在谈论ListView In that case, here is an article that describes paging for ListView s.在这种情况下, 这里有一篇文章描述了ListView的分页。

Basically you add a DataPager , which again has a PageSize property.基本上,您添加一个DataPager ,它又具有PageSize属性。 It is well described in the linked article.链接的文章中对此进行了很好的描述。

if you are talking about ASP.net you could use a DataPager control that allows you to set up all the common Paging properties(PageSize,etc)如果您在谈论 ASP.net,您可以使用 DataPager 控件,该控件允许您设置所有常见的分页属性(PageSize 等)

http://thibautvs.com/blog/?p=718 http://thibautvs.com/blog/?p=718

http://www.4guysfromrolla.com/articles/021308-1.aspx http://www.4guysfromrolla.com/articles/021308-1.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM