NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

GridColumnsCollection.Item (Int32)

Gets the DataGridColumn at a specified index.

[C#] In C#, this member is the indexer for the GridColumnsCollection class.

[Visual Basic]
Overloads Public Default ReadOnly Property Item( _
   ByVal index As Integer _
) As DataGridColumn
[C#]
public DataGridColumn this[
   int index
] {get;}
[C++]
public: __property DataGridColumn* get_Item(
   int index
);
[JScript]
returnValue = GridColumnsCollectionObject.Item(index);
-or-
returnValue = GridColumnsCollectionObject(index);

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed Item property whose type is Object and whose index type is String.

Arguments [JScript]

index
The zero-based index of the DataGridColumn to return.

Parameters [Visual Basic, C#, C++]

index
The zero-based index of the DataGridColumn to return.

Property Value

The specified DataGridColumn.

Example [Visual Basic]

The following example gets the DataGridColumn using the Item property (GridColumnsCollection indexer).

[Visual Basic]

Dim index As Long 
index = 0
Dim gCol As DataGridColumn
' Get the DataGridColumn at the specified index.
Set gCol = DataGrid1.GridColumns(index)
Debug.Print gCol.GetType.ToString

See Also

GridColumnsCollection Class | GridColumnsCollection Members | System.WinForms Namespace | GridColumnsCollection.Item Overload List