Gets or sets the specific data member in a multimember data source that the grid binds to.
[Visual Basic]
Public Property DataMember As String
[C#]
public string DataMember {get;set;}
[Delphi]
public property DataMember: String read get_DataMember write set_DataMember;
Remarks
This property returns or sets the name of the data member used to populate the grid. Typically, a data member represents a database table or query.
A bound DataSource can expose multiple sets of data that consumers can bind to. Each set of data is called a data member, and is identified by a unique string.
Example
The following code sets the sets the DataMember property to Customers for a grid bound to the TDBGDemo database. The TDBGDemo.mdb database file is installed to C:\Program Files\ComponentOne Studio.NET 2.0\common by default.
Me.C1TrueDBGrid1.DataMember = "Customers"
· C#
this.c1TrueDBGrid1.DataMember = "Customers";
· Delphi
Self.C1TrueDBGrid1.DataMember := 'Customers';
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |