ListObject::DataMember Property

 

Gets or sets the specific data member in a multimember data source to bind to the ListObject control.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

property String^ DataMember {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

A data member from a multimember data source. The default value is Empty.

Not needed if the data source has only one member.

Use the DataMember property to specify a member from a multimember data source to bind to the ListObject control. For example, if you have a data source with more than one table specified in the DataSource property, use the DataMember property to specify which table to bind to the ListObject control.

The following code example creates a DataSet with two DataTable objects and populates one of the tables with data. The code then sets the DataSource and DataMember properties of the ListObject to bind to the table that contains data.

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: