Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Grid bug
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00003241
Message ID:
00003261
Views:
35
>If somebody has a nice synopsis of how to make
>grids behave
>(i.e., maintain their column widths, headings,
>etc), I would sure
>like for them to post it.

Hi Mark,

The workaround i've found to prevent a grid from losing it's design properties when the recordsource is changed programatically, is reseting first the recordsource property:

* Always before changing recordsource on a grid
THISFORM.MyGrid.RecordSource = ""
* Then assign your new source of data.
* If you have a SQL-Query into Cursor that changes the content
* of the data in the grid, no matter if (the cursor) have the
* same name it has before, here is where to place it. (After * reseting Recordsource)
THISFORM.MyGrid.RecordSource = "MySource"
* And refresh it
THISFORM.MyGrid.Refresh()

HTH,
J. Luis
J. Luis Santiago Rodríguez.• CADIS • E-mail: jlsantiago@iserve.net.mx• Ciudad de México.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform