Export (0) Print
Expand All

DataRowView.Item Property (Int32)

Gets or sets a value in a specified column.

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)

Public Property Item ( _
	ndx As Integer _
) As Object


Type: System.Int32

The specified column.

Property Value

Type: System.Object
The value of the column.

The following example displays the value in each item of each DataRowView in a DataView.

Private Shared Sub WriteViewRows(view As DataView)
   Dim colCount As Integer = view.Table.Columns.Count

   ' Iterate through the rows of the DataView. 
   Dim rowView As DataRowView
   Dim i As Integer 

   For Each rowView In view
     ' Display the value in each item of the DataRowView 
     For i = 0 To colCount
        Console.Write(rowView(i) & vbTab)
End Sub

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
© 2015 Microsoft