启用分页时如何获取Datagrid.items.count [英] How to get Datagrid.items.count when paging is enabled

查看:154
本文介绍了启用分页时如何获取Datagrid.items.count的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我们正在使用datagrid在网页中显示值.启用datagrid的页面调度.每页的项目数是10.我的datagrid中有15个项目.现在我想遍历datagrid中的每一行.当我尝试datagrid.items时.count返回10.如何获取15并遍历datagrid中的所有项目.

所有帮助都是高度可观的!

Hi All,
We are using datagrid to display values in the web page.Paging for datagrid is enabled.Items per page is 10.I have 15 items in my datagrid.Now i want to loop through each row in the datagrid.When i try datagrid.items.count it returns 10.how do i get 15 and loop through all the items in the datagrid.

All helps are highly Appreciable !!

推荐答案

您使用的是:
you use :
GridView1.Rows.Count


嗨 除了上述解决方案之外,您还必须将gridview与某些源绑定,以便您可以计算该源中的记录,这将等同于您在gridview中的记录
希望对您有帮助
谢谢.
hi apart from above solution you must be binding gridview with some source so you can count the records in that source it will be equivalent to your records in gridview
hope this will help you
thanks.


这篇关于启用分页时如何获取Datagrid.items.count的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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