Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Embedded Grid on Form not showing RecordSource Data
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00790063
Message ID:
00790111
Views:
16
A couple of things.

First, I don't see you setting the ChildOrder property of the grid. With the technique you're using to display child records, that's a requirement.

Second, I'm not sure at what point you're setting the grid's RecordSource, but if you're grid's RecordSource is unavailable at any time, either because the cursor isn't opened, or you re-create it with a SQL SELECT statement, the grid will go blank. You need to set the RecordSource to "" if you're going to do anything that closes the RecordSource, then set it back once the RecordSource is re-created. There's a lot to this, so if this does turn out to be the problem, let me know, so we can get into more detail.

>I'm a NEWBIE, so this may seem simple, so bear with me.
>
>I have a form in my application with an embedded Grid. It is an
>inherited application, and the database has already been setup for
>my use, as was a template form where most of the code below comes from.
>It is not showing the child table data in the Grid as I expect it would.
>The Grid is empty. I've tested the SQL against the main record (parent table) that loads in the form, and records come back from Child table that grid is based on.
>
>Any help appreciated!
>
>Fred Z
>< < < < < < < < < < <
>
>Form:
>
>Load() *// Method
>
>*// 3 main tables used by form, and hence embedded grid.
>
>USE DD_ecr order cr_number share
>USE DD_ecrapp order ra_dsort share
>USE DD_dwgh order dh_dcn share
>
>=CURSORSETPROP("buffer",5,"DD_ecrapp")
>
>SET RELATION TO ra_dcn INTO dd_dwgh IN dd_ecrapp ADDITIVE
>
>SELECT(THISFORM.r_cmasteralias)
>GO TOP
>
>
>*// Fields for each table:
>
>* - DD_ecr: (Many)..., cr_rcn
>* - DD_ecrapp: ra_dsort, ra_rcn, ra_dcn***
>* - DD_dwgh: dh_dwgnum, dh_rev, dh_stitle, ..., dh_dcn***
>
>*// Indexes for each table:
>
>* - DD_ecr: cr_number, cr_rcn
>* - DD_ecrapp: ra_dsort, ra_rcn, ra_dcn**
>* - DD_dwgh: dh_dcn** (PK index), dh_dwgnum, ..., ...
>
>*// grdDwgList (Grid in Form)
>
>*// Properties:
>
>*// .RecordSource - DD_ecrapp
>*// .LinkMaster - DD_ecr
>*// .RelationalExpr - str(cr_rcn)
>
>*// Col 1 Col 2 Col 3
>
>*// Drawing Rev Title
>
>*// Textbox Textbox Textbox
>
>* Col 1.ControlSource: dd_dwgh.dh_dwgnum
>* Col 2.ControlSource: dd_dwgh.dh_rev
>* Col 3.ControlSource: dd_dwgh.dh_stitle
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform