Gets or sets the name of the list or table in the data source for which the
GcMultiRow control displays data.
<SRDescriptionAttribute("Indicates a sub-list of the DataSource to show in the GcMultiRow control.")>
<FeatureAttribute(Name="DataBinding", Version="v5.0")>
<DefaultValueAttribute()>
<SRCategoryAttribute("Data")>
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="System.Windows.Forms.Design.DataMemberListEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
Public Property DataMember As String
Dim instance As GcMultiRow
Dim value As String
instance.DataMember = value
value = instance.DataMember
[SRDescription("Indicates a sub-list of the DataSource to show in the GcMultiRow control.")]
[Feature(Name="DataBinding", Version="v5.0")]
[DefaultValue()]
[SRCategory("Data")]
[Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="System.Windows.Forms.Design.DataMemberListEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public string DataMember {get; set;}
Property Value
A
System.String that represents the name of the table or list in the
DataSource for which the
GcMultiRow control displays data. The default is
String.Empty.
The following code example shows how to use this property to bind one table in a multiple table data source. This code example is part of a larger example provided for the
DataSource property.
private void Form1_Load(object sender, EventArgs e)
{
InitializeDataSource();
// The following code can be used instead:
// this.gcMultiRow1.DataSource = studentInfoDataSet.Tables["BasicInfos"];
this.gcMultiRow1.DataSource = studentInfoDataSet;
this.gcMultiRow1.DataMember = "BasicInfos";
// When data binding, the cells in the template should set the DataField property to bind a specific column of the data source.
this.gcMultiRow1.Template = this.CreateDataBindingTamplate();
this.gcMultiRow1.DataError += new EventHandler<DataErrorEventArgs>(gcMultiRow1_DataError);
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
InitializeDataSource()
' The following code can be used instead:
' this.gcMultiRow1.DataSource = studentInfoDataSet.Tables["BasicInfos"];
Me.gcMultiRow1.DataSource = studentInfoDataSet
Me.gcMultiRow1.DataMember = "BasicInfos"
' When data binding, the cells in the template should set the DataField property to bind a specific column of the data source.
Me.gcMultiRow1.Template = Me.CreateDataBindingTamplate()
End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2