全国统一热线:
028-86758058
18980748058
购买流程
付款方式
常见问题
在线提问
续租服务
购物车(
0
件)
用户名:
密 码:
记住
首 页
HOME
域名注册
DOMAIN
虚拟主机
WEB HOST
成品网站超市
AUTO Site
VPS主机
VPS SERVER
云 主 机
CLOUD HOST
租用托管
SERVER
海外主机
HK HOST
代理专区
AGENT
客服中心
SERVICE
站长教程
SERVICE
欢迎光临西部数据云计算中心,我们将竭诚为您提供最优质的服务!
中文域名
域名转入
域名转出
DNS管理
动态域名
获取域名证书
域名停放
域名过户
集群主机
双线主机
基本主机
港台主机
论坛主机
Linux主机
Vip合租主机
超G型主机
ASP.net主机
Java主机
智能建站主机
网店主机
美国主机
数据库
成品网站超市
智能建站主机
集群VPS主机
国内VPS主机
香港VPS主机
美国VPS主机
云主机介绍
云主机购买
服务器租用
主机托管
常见问题
香港主机
港台主机
美国主机
国内免备案
步骤流程
代理级别
代理合同
代理模式
代理优势
在线申请
产品列表
常见问题
代理商分布图
常见问题
有问必答
跟踪提问
购买流程
产品价格
付款方式
常用软件
网站备案
续租服务
汇款确认
相关文档
联系我们
域名资讯
主机资讯
行业动态
网页制作
php教程
mysql教程
域名资讯
云计算资讯
网络编程
您当前的位置:
首页
>
网络编程
>
Net教程
asp.net Gridview行绑定事件新体会
时间:2015-01-29 来源:互联网 作者:佚名
在网上搜了一下事件执行顺序,并经过测试在有分页的情况下是不正确的。
事件执行顺序:
一、GridView 显示绑定的数据(默认为5行):
复制代码
代码如下:
DataBinding
RowCreated:Header[0]
RowDataBound
RowCreated:DataRow[1]
RowDataBound
RowCreated:DataRow[2]
RowDataBound
RowCreated:DataRow[3]
RowDataBound
RowCreated:DataRow[4]
RowDataBound
RowCreated:DataRow[5]
RowDataBound
RowCreated:Footer[6] //不管有没有页角行,该事件都会发生
RowDataBound
RowCreated:Pager[7]
RowDataBound
DataBound
顺序如下:
DataBinding
RowCreated
RowDataBound
......
DataBound
二、GridView 点击分页按钮时的事件发生顺序:
复制代码
代码如下:
RowCommand
PageIndexChanging
PageIndexChanged
DataBinding
RowCreated:Header[8]
RowDataBound
RowCreated:DataRow[9]
RowDataBound
RowCreated:DataRow[10]
RowDataBound
RowCreated:DataRow[11]
RowDataBound
RowCreated:DataRow[12]
RowDataBound
RowCreated:DataRow[13]
RowDataBound
RowCreated:Footer[14]
RowDataBound
RowCreated:Pager[15]
RowDataBound
DataBound
理解也就是在点跳页按钮的时候,只会绑定要显示的页的资料,如上,因此在RowDataBound中不会绑定所有的资料,此时去统计,只能统计出当前页的加总(如上9-13笔的资料)
目前想来,也只有对要绑定的资料进行统计了。不能在GridView中的事件中去处理。
来顶一下
返回首页
推荐资讯
aspx实现的 jquery ui 的 flexgrid
于是昨天开始慢慢深入研究flexgrid,但似乎找不到aspx的flex
asp.net 合并GridView中某列相同信
解决方法如下(写在公共模块里,定义为静态方法方便调用):
相关文章
ASP.NET编程时遇到GridView的一个问题 激发了未处理的
asp.net 合并GridView中某列相同信息的行(单元格)
asp.net 不用GridView自带删除功能,删除一行数据
asp.net GridView控件中模板列CheckBox全选、反选、取
asp.net GridView排序简单实现
Asp.net中的GridView导出遇到的两个问题和解决方法
asp.net 扩展GridView 增加单选按钮列的代码
DataGridView中绑定DataTable数据及相关操作实现代码
asp.net GridView控件中实现全选的解决方案
asp.net gridview指定某一列滚动
栏目更新
栏目热门
返回首页
关于我们
联系我们
付款方式
价格总览
资讯中心
友情链接
媒体关注
有问必答
投诉建议
网站备案
《中华人民共和国增值电信业务经营许可证》编号:川B2-20080058号
官方网址:
xibushuju.com
西部数据
Copyright © 2002~2015
天府快车
版权所有
电话总机:
028-86758058
(50线) 传真:
028-86758058