Board index » delphi » DBGrid: Change column order stuffs .Fields!

DBGrid: Change column order stuffs .Fields!

If I refer to the fields in my TDBGrid via the .Fields property:

and the user changes the order of the columns at runtime...

then the underlying .Fields change position too!! Even more astonishingly
the DBGrid.Datasource.Dataset.Fields change too!!

Is this a bug?  Does anybody think this is desirable behaviour?

Kerry Sainsbury, |      THE INFORMIX FAQ v2.4 Oct 95
Quanta Systems, Auckland            |
New Zealand. Work: +64 9 377-4473   |
             Home: +64 9 279-3571   |


Re:DBGrid: Change column order stuffs .Fields!

There is an option in the dbgrid named Options | dgColumnResize. Set it
to false and users can't change column order at runtime anymore.

Other Threads