DetailsView.CreateRow(Int32, DataControlRowType, DataControlRowState) 方法

定义

使用指定项索引、行类型和行状态创建 DetailsViewRow 对象。Creates a DetailsViewRow object using the specified item index, row type, and row state.

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

参数

rowIndex
Int32

要显示的数据项的从零开始的索引。The zero-based index of the data item to display.

rowType
DataControlRowType

DataControlRowType 值之一。One of the DataControlRowType values.

rowState
DataControlRowState

DataControlRowState 值之一。One of the DataControlRowState values.

返回

一个具有指定项索引、行类型和行状态的 DetailsViewRowA DetailsViewRow with the specified item index, row type, and row state.

注解

方法是由控件调用以创建DetailsViewRow对象的帮助器方法。 DetailsView CreateRowThe CreateRow method is a helper method called by the DetailsView control to create a DetailsViewRow object.

继承者说明

扩展DetailsView类时, 可以重写此方法以DetailsViewRow返回具有自定义设置的对象。When extending the DetailsView class, you can override this method to return a DetailsViewRow object with custom settings.

适用于

另请参阅