ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.MoveRelative Method (Int32)

Moves the current row positions of the grid by the given offset.

[Visual Basic]

Overloads Overridable Public Sub MoveRelative( _

ByVal offset As Integer _

)

[C#]

virtual public void MoveRelative(

int offset

);

[Delphi]

public procedure MoveRelative(

offset: Int32

); overload; virtual;

Parameters

offset

The number of records to move. A positive value indicates forward movement; a negative value indicates backward movement.

Example

The following code provides an example of the MoveRelative method so that when the button is clicked the grid positions the current row two rows forward:

·      Visual Basic

       Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

           Me.C1TrueDBGrid1.MoveRelative(2)

       End Sub

·      C#

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

       {

           this.c1TrueDBGrid1.MoveRelative(2);

       }

·      Delphi

       procedure Button1_Click(sender: System.Object; e: System.EventArgs);

       begin

         Self.C1TrueDBGrid1.MoveRelative(2);

       end;

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace | C1TrueDBGrid.MoveRelative Overload List


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