×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Real simple grid question

Real simple grid question

Real simple grid question

(OP)
I am using VFP 5

The problem started with the fact that I had a grid on a form that when I down arrowed to the last record of the of the displayed records.  When I continue down arrowing to the next records sometimes the record scrolling was not smooth and I had to hold down the key for a period of time to get to the next record.  I am running on a standalone with a 25 record table so that network performance and table size are not issues.  

I decided to try to debug this by creating a test example outside the program and created a simple project of one form and the form has one grid with 2 command bottoms, OK and Cancel.  The code in the main file is:

SELECT * FROM Customer INTO CURSOR cCust
DO FORM form1
READ EVENTS

On the grid I set the RecordSource property to cCust, set column count to 3 and then set each column control source to cCust.FieldName.  

When I run the application I get a form with no data in the grid but the cursor is open in the status line at the bottom.  Why??

TIA,

Jean

RE: Real simple grid question

>>
On the grid I set the RecordSource property to cCust, set column count to 3 and then set each column control source to cCust.FieldName.  

Try setting the columncount first and then the record source and the control sources.

HTH,


Weedz (Wietze Veld)
My private project:www.crowncap.demon.nl\info\crwnbase
Download the CrownBase source code !!

RE: Real simple grid question

(OP)
Is your suggestion for when setting the grid programmatically?  I set the column count, record source and control source from the form designer.  

Thanks,
Jean

RE: Real simple grid question

Are you sure the recordsource is set at runtime ?
Are you sure the cursor has records ?
Are you sure at runtime the controlsources are set correctly ?

Good luck,

Weedz (Wietze Veld)
My private project:www.crowncap.demon.nl\info\crwnbase
Download the CrownBase source code !!

RE: Real simple grid question

Hi
When you say Do FORM form1.....
form1 shall have the Default Data Scession. It shall not have Private Data Scession, since the cursor is selected in the calling form. Hope you have not set any DE componenet (tables opened thru DE and set that as the initialy selected Table.

Hope this helps you.

ramani
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close