Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid management & Lost Columns
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00544682
Message ID:
00544708
Views:
20
This message has been marked as the solution to the initial question of the thread.
>Hi all!
>
>I have the following problem:
>
>I need to add a column to a grid at runtime. This column is bound to a column
>of a cursor that is 'child related' to de main cursor of the grid.
>After some user interaction I need to delete the added column and close the
>child cursor, but when this happens I loose all the other columns of the grid
>(mygrid.columncount=0). Some clue of what's happening.
>
>TIA
>
>Gustavo Schweitzer

Hi Gustavo,
This happens because you close the child cursor. You rip the RecordSource from under yor grid. Set grid.RecordSource = "" before closing the cursor. You may reset it back later. If you use your column ControlSources not in the default order (as they appear in your cursor), you might need to individually set them too in the right order, after you set the new grid.RecordSource again.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform