asp.net.ph

DataRowView.Item Property ( Integer )

System.Data Namespace   DataRowView Class


Sets or retrieves a value in a specified column given the column index.

Syntax


Object variable = DataRowView.Item [ index ];
... or ...
Object variable = DataRowView [ index ];
  C# VB JScript

Parameters

index
The index number of a DataColumn to set or get a value.

Property Value

The value of the column.

Example

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

private static void WriteViewRows ( DataView dv ) {
   int colCount = dv.Table.Columns.Count;
   // iterate through the rows of the DataView.

   foreach ( DataRowView drv in dv ) {
      // display the value in each item of the DataRowView

     for ( int i = 0; i < colCount; i++ ) {
         Response.Write ( drv [ ] + "<br>" );
      }
    }
}
  C# VB

See Also

DataRowView Members   DataRowView.Item Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph