GridView.OnRowDataBound(GridViewRowEventArgs) 方法 (System.Web.UI.WebControls)

GridView.OnRowDataBound(GridViewRowEventArgs) 方法 (System.Web.UI.WebControls)

引發 RowDataBound 事件。

protected:

virtual void OnRowDataBound(System::Web::UI::WebControls::GridViewRowEventArgs ^ e);

protected virtual void OnRowDataBound(System.Web.UI.WebControls.GridViewRowEventArgs e);

abstract member OnRowDataBound : System.Web.UI.WebControls.GridViewRowEventArgs -> unit

override this.OnRowDataBound : System.Web.UI.WebControls.GridViewRowEventArgs -> unit

Protected Overridable Sub OnRowDataBound (e As GridViewRowEventArgs)

參數

e

GridViewRowEventArgs

GridViewRowEventArgs A 包含事件資料。

備註

在控制項渲染之前 GridView ,控制項中的每一列必須綁定到資料來源中的記錄。

RowDataBound當資料列(由物件GridViewRow表示)綁定到控制項中的GridView資料時,該事件就會被觸發。 這讓你能提供一種事件處理方法,執行自訂例程,例如在事件發生時修改綁定到該列的資料值。

發起事件會透過代理呼叫事件處理者。 欲了解更多資訊,請參閱 處理與提升事件。

此 OnRowDataBound 方法也允許衍生類別在不附加代理的情況下處理事件。 這是在衍生類別中處理事件的首選技術。

有一個包含原始碼的 Visual Studio 網站專案可供此主題提供: 下載。

給繼承者的注意事項

在導出類別中覆寫 OnRowDataBound(GridViewRowEventArgs) 時,務必呼叫基底類別的方法 OnRowDataBound(GridViewRowEventArgs) ,讓註冊代理接收事件。

適用於

另請參閱

GridViewRowEventArgs

RowDataBound

RowCreated

OnRowCreated(GridViewRowEventArgs)

相关文章

365500 法国队将于8月27日20时公布9月份世预赛大名单
365bet亚洲真人 四地实探苹果新机开售:黄牛热炒Pro Max,标准版价格却“破发”
365500 跨国汇款多久到账(建行跨国汇款多久到账)
365500 手机充不满电?这5个原因你可能没想到
365500 世界杯意大利男篮vs美国男篮分析预测大小分推荐 美国男篮需小心阴沟翻船
beat365倍率 QQ空间打不开是怎么回事 QQ空间加载异常怎么办