Larry,

 

Once again, after I sent the email asking for help, I attempted exactly
what you mentioned below.

Thanks for the tip.  That is what I needed.

 

Jim

 

 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Monday, May 10, 2010 11:01 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: var listview DBgrid connection

 

<< 

I cannot get the DBGrid to change based on clicking on the different
parts in the list view. 

>> 

 

The rows shown in a DBGrid cannot easily be affected by a variable value
in the form.  DBGrid rows are determined by the WHERE clause you used to
start the form or, if the DBGrid is attached to a table other than the
driving table for the form, by the common column values between the
driving table and the secondary table.

 

The easiest way to handle this is to replace the DBGrid with another
Variable Lookup Listview.  I assume you want a DBGrid because you want
those values to be editable, rather than just displayed (as with a
Listview).  If that's the case, create a separate one-table editable
form for that table, and use it from the ON DOUBLE CLICK EEP of the new
Listview.

 

If that's not good enough, with some work you can get the effect that
you want.  Here are two ideas (I'm sure there are more):

 

1. Create a temporary view that defines only the rows you want in the
grid.  Base the grid on that view, rather than the original table (a
one-table view with no calculated columns will still be editable).  Now,
when the variable value changes do PROPERTY TABLE ViewName CLOSE,
recreate the view and do PROPERTY TABLE ViewName OPEN.  If there are
other tables associated with the form, make sure your temporary view
does not have any column names.

 

2. Create a one-row temporary table to use as the driving table of the
form.  This table should contain only the columns that "control" the
table in the grid, and the column names should match.  Then, as the user
makes selections in your form, update the driving table columns and
force everything to recalculate.  The new main table values should force
the grid to display the rows you want.

 

--

Larry

 

Reply via email to