Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow grid update / refresh
Message
From
29/03/2010 23:29:30
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01458010
Message ID:
01458012
Views:
68
Use a view instead. You can add/edit/delete in the view and have the data changes show up quickly.

>Why doesn’t my grid show updates faster? In a private data session, I have a child table which has additions and edits as well as deletions performed, (imagine the classic invoice). The additions or changes won’t show immediately in the grid displaying the child records.
>The grid is populated by a cursor created with a select statement. After each change is made to the child table, the cursor is re-created. Before creation of the cursor, the grid’s ‘controlsource’ property is set to space(0) and then reset after cursor creation. Still the changes won’t appear until another record is added, or when you close the form and re-open it again.
>
>Sample code:
>* prepare for new cursor
> .RECORDSOURCE = SPACE(0)
> .RECORDSOURCETYPE = 0
>
> SELECT orderitemdetail.model, orderitemdetail.itemdesc, ;
> orderitemdetail.qtyordered, orderitemdetail.parentkv,; orderitemdetail.salesprice, ;
> orderitemdetail.draccount, orderitemdetail.craccount, ;orderitemdetail.ordernum ;
> FROM orderitemdetail ;
> WHERE !DELETED() AND ;
> orderitemdetail.parentkv = PKV;
> INTO CURSOR csrOID ;
> ORDER BY model
>
> .RECORDSOURCETYPE = 1
> .RECORDSOURCE = 'csrOID'
>
>
>Thank you in advance for your suggestions,
>
>Gary
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform