Solved

Current record to the bottom of the TDBGrid

Posted on 2002-03-30
2
271 Views
Last Modified: 2010-04-04
Using Delphi 3 with a TDBGrid and Paradox table...

I realize that DBGrid1.Last will move the current record position to the last record (bottom) of the DBGrid, however, I want to perform something different...

Rather than move the record position to the last record, I want to have the CURRENT RECORD POSITION placed at the bottom of the VISIBLE grid.  IOW, let's say I have a table of 1000 records, and the DBGrid.Height = 465.  With a DBGrid.Font.Size = 10 I can view approx. 20 rows in the grid.  Now, let's say that at the top of the VISIBLE grid we have record number 265, and record number 284 is at the bottom of the VISIBLE grid, and that the current record position is at 270.   What I want to do is to have record number 270 placed at the bottom of the DBGrid.

How can this be accomplished?
0
Comment
Question by:Monroe406
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 6907786
? maybe, use two grids,
both connected to the same datasource,
but one shows only the current record (height-property)
0
 

Author Comment

by:Monroe406
ID: 6918664
A better solution would be to resize the one grid.  The current record position jumps to the bottom of the grid whenever the grid shrinks in size (height).
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question