ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.MoveFirst Method

Positions to the first row of the datasource.

[Visual Basic]

Overridable Public Sub MoveFirst()

[C#]

virtual public void MoveFirst()

[Delphi]

public procedure MoveFirst(); virtual;

Example

The following code provides an example of the MoveFirst method called in the First button procedure so when the First button is clicked the grid positions to the first row or record of the data source:

·      Visual Basic

       Private Sub btnFirst_Click(ByVal sender As System.Object,  ByVal e As System.EventArgs) Handles btnFirst.Click

           ' Move to the first record in the grid.

           Me.C1TrueDBGrid1.MoveFirst()

       End Sub

·      C#

       private void btnFirst_Click(object sender, System.EventArgs e) 

       {

           // Move to the first record in the grid.

           this.c1TrueDBGrid1.MoveFirst();

       }

·      Delphi

       procedure TWinForm.button4_Click(sender: System.Object; e: System.EventArgs);

       begin

         // Move to the first record in the grid.

         Self.C1TrueDBGrid1.MoveFirst;

       end;

For more information on this example, see Tutorial 4 - Interacting with Code and Other Bound Controls.

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.