Record Yang Ditemukan Tampil Teratas


Tips & Trik Delphi, Tips Belajar Delphi, Belajar Delphi Online
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, Db, DBTables, StdCtrls, Grids, DBGrids;

type
TForm1 = class(TForm)
Panel1: TPanel;
DBGrid1: TDBGrid;
Edit1: TEdit;
DataSource1: TDataSource;
Table1: TTable;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

type

TGridCracker = class(TCustomGrid);

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var

Distance : integer;

begin
Table1.Locate(‘CustNo’,Edit1.Text,[]);
Distance := Table1.MoveBy(TGridCracker(DBGrid1).VisibleRowCount-1);
Table1.MoveBy(-Distance);
end;

end.

TransCODE Software

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s