Szerkesztés

Megosztás a következőn keresztül:


DataGridColumnCollection(DataGrid, ArrayList) Constructor

Definition

Initializes a new instance of the DataGridColumnCollection class.

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)

Parameters

owner
DataGrid

The DataGrid control that corresponds with this collection.

columns
ArrayList

A ArrayList that stores the collection of columns.

Examples

The following code example demonstrates how to create and initialize a new instance of the DataGridColumnCollection class.

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

Remarks

Use this constructor to create and initialize a new instance of the DataGridColumnCollection class.

Applies to

See also