Board index » delphi » DBGrid- Why does inserted record drop to end of grid?

DBGrid- Why does inserted record drop to end of grid?

When I press Insert Key and place a new record in a database grid
the record drops to the bottom of the grid when I move off this record.
Why does this happen? Help Appreciated!

 

Re:DBGrid- Why does inserted record drop to end of grid?


In the Delphi help, search for Append Method. The answers to your
question will be answered there. Basically, you need to define an
index.

On 7 May 1996 13:32:34 GMT, Jeffrey Ottery

Quote
<jott...@yarra.vicnet.net.au> wrote:
>When I press Insert Key and place a new record in a database grid
>the record drops to the bottom of the grid when I move off this record.
>Why does this happen? Help Appreciated!

Re:DBGrid- Why does inserted record drop to end of grid?


Quote
Jeffrey Ottery <jott...@yarra.vicnet.net.au> wrote:
>When I press Insert Key and place a new record in a database grid
>the record drops to the bottom of the grid when I move off this record.
>Why does this happen? Help Appreciated!

It may be due to the index that you are using.  The new data may
naturally belong on the bottom of the table.  Also, you may try
refreshing the table-although it really sounds like the index is
probably the cause.

-Anthony

Re:DBGrid- Why does inserted record drop to end of grid?


Jeffrey Ottery wrote in a message to All:

JO> When I press Insert Key and place a new record in a database grid
JO> the record drops to the bottom of the grid when I move off this
JO> record. Why does this happen? Help Appreciated!

The records in the grid is displayed in index order. What do you use as your
index? Does the record perhaps belong at the end of the index?

Best regards,
   Christian // ctib...@silver.ct.se

.. Diplomacy is saying "nice doggy" until you find a rock.

Other Threads