Binds the grid at run time.
[Visual Basic]
Overloads Public Sub SetDataBinding( _
ByVal dataSource As Object, _
ByVal dataMember As String, _
ByVal holdFields As Boolean _
)
[C#]
public void SetDataBinding(
object dataSource,
string dataMember,
bool holdFields
);
[Delphi]
public procedure SetDataBinding(
dataSource: Object;
dataMember: String;
holdFields: Boolean
); overload;
Parameters
dataSource
Source of the data.
dataMember
The table to bind to within the object returned by the DataSource property.
holdFields
True to preserve design time layout.
Example
The following code provides an example of the SetDataBinding method:
Me.C1TrueDBGrid1.SetDataBinding(ds.Tables("mySQL"), ", False)
· C#
this.c1TrueDBGrid1.SetDataBinding(ds.Tables["mySQL"], ", false);
· Delphi
Self.C1TrueDBGrid1.SetDataBinding(ds.Tables['mySQL'], '', False);
For a full example using the SetDataBinding method, see Tutorial 2 - Using True DBGrid with SQL Query Results.
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace | C1TrueDBGrid.SetDataBinding Overload List
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |