NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.DataMember

Gets or sets the specific table in a DataSource for the control.

[Visual Basic]
Public Property DataMember As String
[C#]
public string DataMember {get; set;}
[C++]
public: __property String* get_DataMember();
public: __property void set_DataMember(String*);
[JScript]
public function get DataMember() : String;
public function set DataMember(String);

Property Value

A string that specifies the specific table in a DataSource.

Remarks

The DataMember property must be set if there is more than one table contained by a DataSource reference.

Example [Visual Basic]

The following example sets the DataSource and DataMember properties before invoking the PopulateColumns method of a DataGrid control.

[Visual Basic]

Private Sub SetSourceAndMember()
   Dim source As Object
   ' Not shown: Set source to a valid data source
   
   ' Set DataMember
   Dim member As String
   member = "Customers"
   Set DataGrid1.DataSource = source
   DataGrid1.DataMember = member
   DataGrid1.PopulateColumns
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | DataSource