Este artigo foi traduzido por máquina. Para visualizar o arquivo em inglês, marque a caixa de seleção Inglês. Você também pode exibir o texto Em inglês em uma janela pop-up, movendo o ponteiro do mouse sobre o texto.
Tradução
Inglês

Método GridView.OnRowDataBound (GridViewRowEventArgs)

 

Aciona o evento RowDataBound.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (em System.Web.dll)

protected virtual void OnRowDataBound(
	GridViewRowEventArgs e
)

Parâmetros

e
Type: System.Web.UI.WebControls.GridViewRowEventArgs

Um GridViewRowEventArgs que contém dados do evento.

Before the T:System.Web.UI.WebControls.GridView control can be rendered, each row in the control must be bound to a record in the data source. The E:System.Web.UI.WebControls.GridView.RowDataBound event is raised when a data row (represented by a T:System.Web.UI.WebControls.GridViewRow object) is bound to data in the T:System.Web.UI.WebControls.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.

Raising an event invokes the event handler through a delegate. For more information, see NIB: Raising an Event.

The M:System.Web.UI.WebControls.GridView.OnRowDataBound(System.Web.UI.WebControls.GridViewRowEventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

A Visual Studio Web site project with source code is available to accompany this topic: Downloadhttp://go.microsoft.com/fwlink/?LinkId=191882.

Observações para os Herdeiros:

When overriding M:System.Web.UI.WebControls.GridView.OnRowDataBound(System.Web.UI.WebControls.GridViewRowEventArgs) in a derived class, be sure to call the base class's M:System.Web.UI.WebControls.GridView.OnRowDataBound(System.Web.UI.WebControls.GridViewRowEventArgs) method so that registered delegates receive the event.

.NET Framework
Disponível desde 2.0
Retornar ao início
Mostrar: