Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid lose layout when switching table
Message
From
11/01/2006 15:24:09
 
 
To
11/01/2006 15:15:16
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01085815
Message ID:
01085831
Views:
17
>>>Hi all,
>>>
>>>I must be brain-dead today.
>>>
>>>I have a grid with a container of controls on it in a single column. When I change from one table to another, the grid reverts to its default setting (one column per field in the table). How can I get the grid to retain its CurrentControl setting?
>>>
>>>I have tried removing and re-establish the custom settings, but it ignores the changes and remains with the default ones.
>>
>>Is the grid used only for showing data, and not for editing? If so, can you use a cursor in stead?
>
>Actually, only one of the controls (checkbox) is a editable. I am currently looking into the cursor idea.
>
>Thanks

Personally I use cursors as controlsource for my grids whenever possible, which means almost always. I populate an empty cursor in the activate of the form using
Select * from mytable into cursor Gridcursor where .F. readwrite
So whenever I Select data, I do it like this
Select * from mytable into cursor dummy where &lcWhere
Select Gridcursor
Zap
Append from dbf('dummy')
Mygrid.refresh()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform