DataGridColumnCollection(DataGrid, ArrayList) 构造函数

定义

初始化 DataGridColumnCollection 类的新实例。

public:
 DataGridColumnCollection(System::Web::UI::WebControls::DataGrid ^ owner, System::Collections::ArrayList ^ columns);
public DataGridColumnCollection (System.Web.UI.WebControls.DataGrid owner, System.Collections.ArrayList columns);
new System.Web.UI.WebControls.DataGridColumnCollection : System.Web.UI.WebControls.DataGrid * System.Collections.ArrayList -> System.Web.UI.WebControls.DataGridColumnCollection
Public Sub New (owner As DataGrid, columns As ArrayList)

参数

owner
DataGrid

对应于此集合的 DataGrid 控件。

columns
ArrayList

存储列集合的 ArrayList

示例

下面的代码示例演示如何创建和初始化 类的新实例 DataGridColumnCollection

void Page_Init(Object sender, EventArgs e)
{
   ArrayList myList = new ArrayList();
   DataGridColumnCollection myColumnCollection = new DataGridColumnCollection(ItemsGrid, myList);
}
Sub Page_Init(sender As Object, e As EventArgs)
    Dim myList As New ArrayList()
    Dim myColumnCollection As New DataGridColumnCollection(ItemsGrid, myList)
End Sub

注解

使用此构造函数创建和初始化 类的新实例 DataGridColumnCollection

适用于

另请参阅