asp.net.ph

DataColumnMappingCollection.RemoveAt Method

System.Data.Common Namespace   DataColumnMappingCollection Class


Removes a specified DataColumnMapping from the collection.

Overload List

1. Removes the DataColumnMapping at the specified index.

2. Removes the DataColumnMapping with the specified SourceColumn name.


Example

The following example first uses the Contains method to find a DataColumnMapping with the specified source column name within the ColumnMappings collection of a specifed DataTableMapping object. If the mapping exists, the example removes it.

NOTE: This example uses one of the overloaded versions of RemoveAt. For other examples that may be available, see the individual overload topics.

public void SearchColumnMappings ( DataTableMapping myTableMap ) {
   DataColumnMappingCollection myFieldsMaps = myTableMap.ColumnMappings;
   if ( myFieldsMaps.Contains ( "Picture" )
      myFieldsMaps.RemoveAt ( "Picture" );

}
  C# VB

See Also

DataColumnMappingCollection Members Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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