Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid driving me nuts!
Message
De
19/02/2008 11:22:36
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01293774
Message ID:
01293794
Vues:
23
>Thanks to all for help in the past. This is a summary of things I've tried since my last query to you. Also, I've reworded the question a bit. I still have no solution yet.
>
>User grid has a check box to select records to process.
> I would like to return to the next record to process after the user has
>processed records that have been checked.
>
>This is the idea I've tried
>1. Keep track of where user stops - via the key for table - Invoice No.
>2. Prior to processing list, skip a record - get that invoice number, store it
>- lnInvNo
>3. process the data and do a tableupdate of underlying view(data source for
>grid) (this does not fail)
>4. do a seek(lnInvNo,'DISPATCH','INVOICENO') where dispatch is name of view,
>and
>invoiceno is an index created when form loads on grid.
>5. Setfocus to the grids, first column first textbox. i.e.
>thisform.cgrid1.column1.text1.setfocus()
>
>However when this is done, the grid gets the focus and not at the record
>selected above, but at the top of the grid.
>
>I have confirmed the above: the seek returns to the right record. Yet once the
>grid gets focus, it goes to the top (aaarrggghhh!)
>
>I have tried the following:
>Added a property to the grid to hold the lnInvNo
>In the gotfocus event of the textbox in column1, I added code to check the
>value
>of the lnInvNo and do the seek above. Again it appears to find the right
>record,
>yet the grid goes to the first record.
>
>I also have added grid refreshes, form refreshes etc to no avail.
>
>Also weird behaivour of grid in debugger. If debugger is on, I cannot select
>any
>record at all. Clicking anywhere on the grid goes to the BOTTTOM (go figure) of
>the grid and stays there.
>
>Any ideas about what is going on?
>
>TIA,
>Mike

Mike,
Probably the problem is with 'refresh'. In a parent-child situation (and if the grid is child) then a refresh on any object that has a controlsource from parent would immediately set to top record in child.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform