Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding objects on a form

Status
Not open for further replies.

prohbe

IS-IT--Management
Jun 5, 2009
3
US
Is there a good article I could be referred to about understanding what binding objects to a form does primarily in reference to binding a table to a grid
Questions are:

Are grids on multiple pages of a container bound at load time?

What functions are not allowed on bound grids. Can I Select into a cursor that is bound to a grid or do I have to do a ZAP/Append?

Thanks much

 
Are grids on multiple pages of a container bound at load time?

To be exact, they are bound at the time you set the RecordSource. If you do that at design time, the binding will take place when the form loads. The fact that the grids are on separate pages isn't relevant.

What functions are not allowed on bound grids.

Not sure what you mean by that. All grids are "bound" grids, in the sense that they are populated from a cursor or table.

Can I Select into a cursor that is bound to a grid or do I have to do a ZAP/Append?

If you SELECT INTO a cursor, then the cursor will be destroyed at the start of the SELECT, and then re-created afterwards. In the short interval after the cursor is destroyed, the grid will lose its columns, including any code or property settings in the columns.

The solution is to use ZAP/Append, or simply remove the RecordSource before the SELECT (set it to an empty string), and reset it to the cursor afterwards.

Is there a good article I could be referred to about understanding what binding objects to a form does primarily in reference to binding a table to a grid

Take a look at my article "Controlling grid data dynamically", at It doesn't directly answer your questions, but it gives a bit of background info.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top