Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interactive Change of Grid Data Source
Message
From
08/12/1998 10:15:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Interactive Change of Grid Data Source
Miscellaneous
Thread ID:
00165073
Message ID:
00165073
Views:
64
I have an application with a parent table which has numerous, one to many relation child data tables.

Most of the child data is not accessed often. I want to write a container class with a combo drop down and a grid. The user will pick the child data table he wants to see and those records will appear in the grid. Number of columns, Column ControlSource and the headers will of course change depending on the table selected.

This means I must interactively change the RecordSource, LinkMaster, ChildOrder and RelationalExpr of the grid depending on the selection of the combo box.

The grid does not seem to react to these changes. In fact I cannot get the data to display when the control is first shown.

I have tried setting RecordSource, LinkMaster, ChildOrder and RelationalExpr when I first initalize the container. (RecordSourceType = 0, table)

The RecordSource is not opened in either the Private or default data sessions.

I have tried opening the data table and setting the relationships Manually, setting RecordSourceType = 1, alias. When I do this the table appears in the Private Data Session but the records do not appear in the grid.

I have tried adding the tables in the form data environment as a test. When I do this the data does appear in the grid, however in spite of setting every ReadOnly property I can find I cannot edit the records.

However I do not want to have to add these tables to the DE if I can avoid it since I do not want to have to open them every time the form is opened.

Also I have tried container.RemoveObject[] the old Grid and container.AddObject[] the new one. The same thing happens -- I do not display the data.

I know I am missing something simple. Any Help is appreciated.
Best Regards
Don Simpson
Next
Reply
Map
View

Click here to load this message in the networking platform