View Full Version : Moving a Row in a DBGrid

03-21-2001, 02:14 AM
I want to move a Row in a DBGrid as you can do in a StringGrid. I know because of indexes in a DBGrid this is
not allowed.But I have special reasons for this.
If there is trick or a way please inform me.

03-21-2001, 05:02 AM
Since you mentioned indexes, I'm assuming that you are using the BDE with dBase, Foxpro or Paradox. The only way that you can do what you want is to add another index that is used to sort the table (for display purposes) and change the value of the key field, eg:

Record Key Value

1 100
2 200
3 300
4 400
5 500
6 600

if you wanted to move record 5 up, you can change the keyvalue to 450.