ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.MoveLast Method

Positions to the last row of the datasource.

[Visual Basic]

Overridable Public Sub MoveLast()

[C#]

virtual public void MoveLast()

[Delphi]

public procedure MoveLast(); virtual;

Example

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

·      Visual Basic

       Private Sub btnLast_Click(ByVal sender As System.Object,  ByVal e As System.EventArgs) Handles btnLast.Click

          ' Move to the last record in the grid.

           Me.C1TrueDBGrid1.MoveLast()

       End Sub

·      C#

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

       {

           // Move to the last record in the grid.

           this.c1TrueDBGrid1.MoveLast();

       }

·      Delphi

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

       begin

         // Move to the last record in the grid.

         Self.C1TrueDBGrid1.MoveLast;

       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.