Topic: PAGE CONTROL
Hello MVD!
I used the pagination function on te tablegrid. The display i set on the grid per page is 500 records. Now my problem how can i display a records counter on the grid just the normal settings...
My Visual Database → General → PAGE CONTROL
Hello MVD!
I used the pagination function on te tablegrid. The display i set on the grid per page is 500 records. Now my problem how can i display a records counter on the grid just the normal settings...
Hello.
Example
procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
Form1.TableGrid1.Columns[0].Footer.Caption := SQLExecute('SELECT COUNT(*) FROM tablename');
end;
BRAVO
Hello MVD
How to go to the first record or to the last record?
ty
Hello manixs
I use this piece of code :
procedure Form1_bLast_OnClick (Sender: string; var Cancel: boolean); // Go to last record
begin
Form1.GridEmployees.SelectedRow := Form1.GridEmployees.RowCount - 1;
end;
procedure Form1_bNext_OnClick (Sender: string; var Cancel: boolean); // Go to the next record
begin
Form1.GridEmployees.SelectedRow := Form1.GridEmployees.SelectedRow +1;
end;
procedure Form1_bFirst_OnClick (Sender: string; var Cancel: boolean); // Go to the First record
begin
Form1.TableGrid1.SelectedRow := 0;
end;
procedure Form1_bPrev_OnClick (Sender: string; var Cancel: boolean); // Go to the previous record
begin
Form1.TableGrid1.SelectedRow := Form1.TableGrid1.SelectedRow -1;
if Form1.TableGrid1.SelectedRow < 0 then Form1.TableGrid1.SelectedRow := 0;
end;
Can this help you ?
JB
Manixs
Here the correct full code, I miss copy of my snipet
procedure Form1_bLast_OnClick (Sender: string; var Cancel: boolean); // Go to last record
begin
Form1.TableGrid1.SelectedRow := Form1.TableGrid1.RowCount - 1;
end;
procedure Form1_bNext_OnClick (Sender: string; var Cancel: boolean); // Go to the next record
begin
Form1.TableGrid1.SelectedRow := Form1.TableGrid1.SelectedRow +1;
end;
procedure Form1_bFirst_OnClick (Sender: string; var Cancel: boolean); // Go to the First record
begin
Form1.TableGrid1.SelectedRow := 0;
end;
procedure Form1_bPrev_OnClick (Sender: string; var Cancel: boolean); // Go to the previous record
begin
Form1.TableGrid1.SelectedRow := Form1.TableGrid1.SelectedRow -1;
if Form1.TableGrid1.SelectedRow < 0 then Form1.TableGrid1.SelectedRow := 0;
end;
JB
Follow this post for more examples
http://myvisualdatabase.com/forum/viewtopic.php?id=4447
THANKS TO ALL SUPPORT
KUDOS!
My Visual Database → General → PAGE CONTROL
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi