Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing grids
Message
From
25/09/1999 15:49:16
Criss Jensen
Injury Prevention Research Center
Iowa City, Iowa, United States
 
 
To
25/09/1999 14:45:40
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00268722
Message ID:
00268986
Views:
21
>>>>Hi All!
>>>>
>>>>I have a form with two grids on different pages. I create a cursor that is the record source for the grid on the second page based on the selection in the grid on the first page. I do this in the refresh of page 2, which specifically calls the grid's refresh. Both grids have only one column in which I have replaced the textbox with an editbox. The first time the grids are displayed, they are fine, but after refreshing, I seem to have a textbox again instead of my editbox, and despite resetting Sparse = .F. in the grid refresh, I only see "Memo" in that field. What am I missing?
>>>>
>>>>TIA,
>>>>Criss
>>>
>>>Are you assigning the gid's recordsource programmatically anywhere? Are you destroying and recreating the base cursor?
>>
>>Hi Erik,
>>Yes, I do a this.recordsource=this.recordsource in each grid's refresh. I was just using a select sql statement to repopulate the cursor in the page refresh method, without destroying and recreating it. I take it that won't work?
>
>A SELECT SQL does destroy and recreate the cursor. Se tthe grid's recordsource to "" before doing the SELECt, and then reset it afterwards, and your special grid features should be preserved.

Thanks, Erik! Worked like a charm!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform