asp.net.ph

DataRowView.Item Property ( String )

System.Data Namespace   DataRowView Class


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

Syntax


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

Parameters

columnName
The name of a DataColumn to set or get a value.

Property Value

The value of the column.

Example

The following example appends text to the value of a column in each modified row of a DataView.

private void SetDataRowView ( ) {
   DataView dv = ( DataView ) myGrid.DataSource;
   // set the filter to display only those rows that were modified.
   dv.RowStateFilter = DataViewRowState.ModifiedCurrent;
   // change the value of the CompanyName column for each modified row.

   foreach ( DataRowView drv in dv ) {
      drv [ "CompanyName" ] += " new value";
   }
}
  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