Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting a column in a grid
Message
From
09/07/2001 16:59:37
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00528362
Message ID:
00528372
Views:
19
>I think I've seen the answer here a sort while ago, but I cannot find it now:)
>
>How can I insert a new column into a grid (created with 9 columns). I need to insert a new column 2 now, and don't want to redo all the other columns.
>
>TIA,
>Julian

You would have to add the column with AddObject or by increasing the ColumnCount by 1. If with AddObject, you have to set the column's Visible property to .T.

Then change the ColumnOrder of the new column to 2 (for 2nd column).
e.g.
oGrid.ColumnCount = oGrid.ColumnCount+1
oGrid.Columns(oGrid.ColumnCount).ColumnOrder = 2
You would also need to set the new column's ControlSource and maybe CurrentControl, Dynamicxxx properties, etc.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform