Re: Grid Control

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Setting the RecordSource="" didn't seem to work, the original Column
properties still got wiped out?

A Parameterized view really won't work. I'm actually jumping through some
hoops trying to use a complex balance *** module for two different
purposes. The actual problem is that I'm adding fields to the under lying
table and adding these new fields to the grid depending on many different
scenarios and user interaction. Once the grid is initiated and I issue an
ALTER TABLE ADD COLUMN, the grid behaves like I closed and reopened the
table.

Thanks
Tim

"David Frankenbach" <sendnospam@xxxxxxxxxxxxxx> wrote in message
news:ODerFzWrFHA.2588@xxxxxxxxxxxxxxxxxxxxxxx
> Tim,
>
> If the cursor is a child table you should look at using a parameterized
> view, when the parent record changes you simply Requery() the view. Under
> these circumstances the grid will not self destruct and then reconstruct
> itself.
>
> If a view won't do then there are two other ways 1) set the
> grid.RecordSource = "", close/open, restore the grid.RecordSource. 2) zap
> the cursor and append the new content back into it.
>
> --
> df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
>
> "Tim Cairns" <tim.cairns@xxxxxxxxxxx> wrote in message
> news:sxZQe.8541$fP.1123@xxxxxxxxxxx
>> VFP9
>>
>> I have a grid control bound (defined) with a ControlSource and Columns to
>> a table. I would like to close the table and reopen it without losing my
>> ControlSource and Column properties. Another example could be if I have
>> a grid bound to a cursor and I would like to re-run the cursor without
>> losing my ControlSource and Column properties.
>
>


.


Quantcast