Gridview Rowdatabound的目的是什么 [英] what is the purpose of Gridview Rowdatabound

查看:75
本文介绍了Gridview Rowdatabound的目的是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Gridview Rowdatabound的用途是什么,给出简洁的解释.

解决方案

在呈现GridView控件之前,控件中的每一行都必须绑定到一个记录在数据源中.当数据行(由GridViewRow对象表示)绑定到GridView控件中的数据时,将引发RowDataBound事件.这样,您便可以提供一种事件处理方法,该方法可以在发生此事件时执行自定义例程,例如修改绑定到该行的数据的值.

整洁的MSDN链接: http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx [ 解决方案

Before the GridView control can be rendered, each row in the control must be bound to a record in the data source. The RowDataBound event is raised when a data row (represented by a GridViewRow object) is bound to data in the GridView control. This enables you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.

Neat MSDN link :
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx[^]


这篇关于Gridview Rowdatabound的目的是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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