ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.MovePrevious Method

Positions to the previous row of the datasource.

[Visual Basic]

Overridable Public Sub MovePrevious()

[C#]

virtual public void MovePrevious()

[Delphi]

public procedure MovePrevious(); virtual;

Example

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

·      Visual Basic

       Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click

           ' Move to the previous record in the grid.

            Me.C1TrueDBGrid1.MovePrevious()

       End Sub

·      C#

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

       {

           // Move to the previous record in the grid.

           this.c1TrueDBGrid1.MovePrevious();

       }

·      Delphi

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

       begin

         // Move to the previous record in the grid.

         Self.C1TrueDBGrid1.MovePrevious;

       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.