DataColumn.ColumnMapping Property
Assembly: System.Data (in system.data.dll)
public: virtual property MappingType ColumnMapping { MappingType get (); void set (MappingType value); }
/** @property */ public MappingType get_ColumnMapping () /** @property */ public void set_ColumnMapping (MappingType value)
public function get ColumnMapping () : MappingType public function set ColumnMapping (value : MappingType)
Not applicable.
Property Value
One of the MappingType values.The ColumnMapping property determines how a DataColumn is mapped when a DataSet is saved as an XML document using the WriteXml method.
For example, if a DataColumn is named "customerID," and its ColumnMapping property is set to MappingType.Element, the column value will produce the following XML:
<Customers> <customerID>ALFKI</customerID> ...... </Customers> <Orders> <OrderID>12345</OrderID> <customerID>ALFKI</customerID> ...... </Orders>
However, if the same column is mapped to MappingType.Attribute, the following XML is produced:
<Customers customerID="ALFKI"........more attributes.....> <Order orderID="1234"....more attributes..../> <Order orderID="1234"....more attributes..../> ...... More orders for this customer </Customers>
Use the DataColumn constructor that contains the type argument to specificy how the DataColumn is mapped when its DataSet is transformed to an XML document.
The ColumnMapping property corresponds to the constructor argument type.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Reference
DataColumn ClassDataColumn Members
System.Data Namespace