GridView.CreateRow Método

Definição

Cria uma linha no GridView controlo.

protected:
 virtual System::Web::UI::WebControls::GridViewRow ^ CreateRow(int rowIndex, int dataSourceIndex, System::Web::UI::WebControls::DataControlRowType rowType, System::Web::UI::WebControls::DataControlRowState rowState);
protected virtual System.Web.UI.WebControls.GridViewRow CreateRow(int rowIndex, int dataSourceIndex, System.Web.UI.WebControls.DataControlRowType rowType, System.Web.UI.WebControls.DataControlRowState rowState);
abstract member CreateRow : int * int * System.Web.UI.WebControls.DataControlRowType * System.Web.UI.WebControls.DataControlRowState -> System.Web.UI.WebControls.GridViewRow
override this.CreateRow : int * int * System.Web.UI.WebControls.DataControlRowType * System.Web.UI.WebControls.DataControlRowState -> System.Web.UI.WebControls.GridViewRow
Protected Overridable Function CreateRow (rowIndex As Integer, dataSourceIndex As Integer, rowType As DataControlRowType, rowState As DataControlRowState) As GridViewRow

Parâmetros

rowIndex
Int32

O índice da linha a criar.

dataSourceIndex
Int32

O índice do item da fonte de dados a associar à linha.

rowType
DataControlRowType

Um dos DataControlRowType valores.

rowState
DataControlRowState

Um dos DataControlRowState valores.

Devoluções

A criada GridViewRow usando os parâmetros especificados.

Observações

O CreateRow método é usado para criar uma linha no GridView controlo.

Note

Este método é usado principalmente pelos desenvolvedores de controlo para estender o GridView controlo. Um controlo ligado GridView a dados gera automaticamente as linhas necessárias para exibir os dados alvo.

Aplica-se a

Ver também