Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User-defined grid's layout
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01153465
Message ID:
01153657
Views:
22
>Hello,
>
>If you want to add a column dynamically you can use .AddObject with a subclassed custom grid column. Also please note there are some security issues associated with the method described in the article depending on where the data is and who has access. You can inject a case statement to just allow certain properties to be user managed.
>
>HTH
>
>Bob
>
I was thinking along these lines:

thisform.myGrid.ColumnCount = thisform.myGrid.ColumnCount + 1
++++++++++++ Info from script
thisform.myGrid.Columns(thisform.myGrid.ColumnCount).ControlSource = ...
thisform.myGrid.Columns(thisform.myGrid.ColumnCount).width = ...
etc.

*****************
In other words, have only the new column definition in the memo field.
Do you think this approach can work?

Or you would suggest to define each possible requested field (so far there are only two combinations) as a class (may be in code) and just add a new column.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform