Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00602738
Message ID:
00602801
Vues:
15
Hi,

the below code in my application inserts a row in a grid for entry of an invoice transaction. The relative row of the newly create row is obtained and then the gird is scrolled so the new line is alway the fourth line in the grid. This allows the user to view similar entries above the new line without manual scrolling. This code could probably be adopted to your situation. It is place in a valid event of a command button that when initiated starts a new invoice.

*--------------------------------------------------------
Thisform.LockScreen = .T.
Thisform.column_order("1")
Thisform.create_invoice()
Thisform.pageframe1.Page2.grid_lines.Column1.SetFocus
Do Case
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=1
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=2
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=3
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=4
Thisform.pageframe1.Page2.grid_lines.DoScroll(0)
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=5
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=6
Thisform.pageframe1.Page2.grid_lines.DoScroll(1)
Case Thisform.pageframe1.Page2.grid_lines.RelativeRow=7
Thisform.pageframe1.Page2.grid_lines.DoScroll(1)
Thisform.pageframe1.Page2.grid_lines.DoScroll(1)
Endcase
Thisform.pageframe1.Page2.grid_lines.Parent.Refresh
Thisform.LockScreen = .F.
*-------------------------------------------------------------------



Leland
Leland F. Jackson, CPA
Software - Master (TM)
smvfp@mail.smvfp.com
Software Master TM
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform