I have a screen which does both.
The grid, which is at level 2, has fields from a table and a view.
I don't think there are any special rules for Views.
They get treated exactly as if they were tables.
(Solomon expects the final column of tables to be a tstamp column.
So I do the same for Views - I have a rstamp as the last column.
I don't know if that is actually required or not.)
There are two SetAddr calls at level 2
Call SetAddr(LEVEL2, "bXDDDoc", bXDDDoc, nXDDDoc, LenB(nXDDDoc))
Call SetAddr(LEVEL2, "bXDGDD_v_ARDoc", bXDGDD_v_ARDoc, nXDGDD_v_ARDoc, LenB(nXDGDD_v_ARDoc))
There is one SQLCursorEx call at level 2
Note that only the table appears in the last parameter - only it gets updated.
Call SqlCursorEx(csrXDDDocEtc, LEVEL2, "csrXDDDoc", "XDDDoc,XDGDD_v_ARDoc", "XDDDoc")
The DetailSetUp call is
garrDocs = detailsetup(csrXDDDocEtc, Spread1, PNULL, bXDDDoc, LenB(bXDDDoc), bXDGDD_v_ARDoc, LenB(bXDGDD_v_ARDoc), PNULL, 0, PNULL, 0)
The grid's DBNav property contains a stored procedure (and several parameters).
The proc starts off with
Select * from XDDDoc X
Join XDGDD_v_ARDoc A on
So it selects columns from both the table and the View.
I think it may be a rule that the SQL matches the SetAddr calls.
The first SetAddr call is for XDDDoc, and the proc selects it first.
In this case, I want the table to get updated, but not the View.
That works out well, because when there are multiple tables (and/or views) at the same level, the kernel will update only the first.
Which is exactly what I wanted.
If I did want the View to be updated, then I would have to write my own code (in the Update event, when the Level parameter = 2).
Barry