Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrollbox disappears, scrollbar disabled in grid
Message
From
15/11/2008 16:40:56
Ken Penrod
Technical Perspectives, Inc.
Richardson, Texas, United States
 
 
To
15/11/2008 10:06:15
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01362035
Message ID:
01362099
Views:
9
>>OK, I've banged my head on the wall enough on this.
>>
>>I have two pages in a pageframe with some textboxes to enter search criteria on Page1 and the results being displayed in a grid on Page2. Whenever I enter search criteria and execute the search the first time the data appears in the grid control correctly. Because the results return a cursor with a lot of records the scrollbar is active and the scrollbox displays. However, if I click back on the first tab and re-execute the same query and return the same cursor, the scrollbar is disabled and the scrollbox disappears.
>>
>>And yes I do make sure I've set the RecordSource back to a dummy SQL statement before re-executing the query so that I don't lose all the settings on my grid.
>>
>>Anyone have an idea about this one? I haven't found anything on this when I searched the forum. I'm running VFP8 on Windows XP.
>
>If you reopen the recordsource alias (by re-executing the SQL, that counts too), you lose the grid. It rebuilds. Search for "safe select" - it's been discussed at lengths.
>
>Basically, you have a cursor for the grid, which doesn't close for the lifetime of the grid. You zap it and insert into it as needed.

Well,Dragan. I tried your approach and I still get the same thing... a disabled scrollbar and no scrollbox on subsquent queries.

I created a readwrite cursor (called kList) before I even instantiated the form. I ran my query and then inserted into kList from my query results. The first time everything is great. Got 45 records and displayed the first 20. Scrollbar was active and scrollbox was available.

I then ran the same query a second time. Got the same 45 records. Zapped kList to clear it out and inserted back into it from query results. The grid displays the first 20 records but scrollbox is missing and scrollbar is disabled. kList never disappeared the whole time. It was specified as the RecordSource for the grid at design time and never changed.

I'm stumped. Anyone have any ideas as to what is going on?

Thanks,
Ken
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform