Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sort Grid's columns property listing by columnorder?
Message
 
To
07/04/2004 08:14:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00892663
Message ID:
00892902
Views:
15
Thanks Anton!

>>Is there a way to have the property [sheet] listings of the added columns reflect the columnorder property?
>
>Hi Terry!
>
>You can do this by editing the Properties field for a grid object in form or classlib file.
>
>There you will find something like that (columns was swapped using the ColumnOrder property):
>
>...
>Column1.ColumnOrder = 2
>Column1.ControlSource = "Field1"
>Column1.Width = 75
>Column1.Name = "Column1"
>Column2.ColumnOrder = 1
>Column2.ControlSource = "Field2"
>Column2.Width = 75
>Column2.Name = "Column2"
>...
>
>
>Now let's edit it to swap these two columns physically:
>
>Column1.ColumnOrder = 1
>Column1.ControlSource = "Field2"
>Column1.Width = 75
>Column1.Name = "Column2"
>Column2.ColumnOrder = 2
>Column2.ControlSource = "Field1"
>Column2.Width = 75
>Column2.Name = "Column1"
>
>
>You need to change both the order of text rows and system names like "Column1", "Column2", etc to reflect the new order. The Name property must stay untouched to preserve binding of columns' child objects.
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform