Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing cursors in a GRID
Message
From
13/06/1998 09:55:12
 
 
To
12/06/1998 09:47:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00107566
Message ID:
00107849
Views:
15
>>I have this form which has among other objects, a grid and a combo box.The combo box has the years "1996", "1997", 1998" etc and in the interactiveChange Method I do a select to a temp table a_temp where the YEAR(field_date) = 1996, 1997 etc as selected in the combo box.
>>Thus the selection is made from the same table to the same named temp table.
>>
>>The grid is setup to display this selection.
>>
>>On the init of the grid when I do a select for 1996 the grid is populated. But when the next year (1997 or 1998) is selected via the combo box, the grid does not display anything although a_temp is present and populated with new data.
>>
>>I have tried the refresh method but cannot get the grid to display the new selection at run time.
>>
>>How do I achieve this?
>>
>>Thanks in advance
>>
>>Bernard
>
>After, the cursor got new contents, you should also fire following code:
>Thisform.Grid.Recordsource=""
>Thisform.Grid.Recordsource="a_temp"
>If you have something specific in column.controlsource(s) or other column properties, you should also repeat these settings here, i.e. ultimately you will need in custom method (thisform.resetgrid) to be issued any time you recollect records into the cursor.

Thanks Ed

I came to the same conclusion tho I had a tough time finding out how to re create the grid with a check box as one of the fields had one. Finally I found a way. Seems the original settings for the grid disappear and have to be reset progmatically again. Even alignment, Sparse etc.

Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform