Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keep grid from going bottom when updating table
Message
From
18/07/2019 17:59:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Keep grid from going bottom when updating table
Miscellaneous
Thread ID:
01669639
Message ID:
01669639
Views:
96
Hey all

So, I've got a grid, RecordSource = the cursor resulting from a MSSQL proc.

If the user checks a box and fills in a date, I update the cursor, clearing/resetting RecordSource and redisplay on form for any editing.

Everything works except that the record that shows in the grid is the last record of the cursor and you have to scroll up for the rest of the records.
Grid Creation (which shows correctly)
  With Thisform.grdLookup
    .RecordSource = 'ClassLook'
    .Width = 735
    .Visible = .T.
    .ColumnCount = 8
    .column1.header1.Caption = 'Change'
    .column1.ToolTipText = "Acceptible Values are 'C','E', 'F','I','M','S' "
    .column1.Width = 50
    .column1.ReadOnly = .F.
    .column1.Format = "!"
    .column2.header1.Caption = 'Status'
    .column2.Width = 75
    .column3.header1.Caption = 'Last Name'
    .column3.Width = 150
    .column4.header1.Caption = 'First Name'
    .column4.Width = 150
    .column5.header1.Caption = 'Grade'
    .column5.Width = 50
    .column5.ReadOnly = .F.
    .column6.header1.Caption = 'CSTSID'
    .column6.width = 75
    .column7.header1.Caption = 'Paid'
    .column7.Width = 50
    .column7.ReadOnly = .F.
    .column8.header1.Caption = 'Paid Date'
    .column8.Width = 75
    .column8.ReadOnly = .F.
  Endwith
Cursor Update
mPayDate = Thisform.txtPaidDt.Value

update ClassLook SET Paid = 'Y', PaidDate = mPayDate
GO top

  With Thisform.grdLookup
    .RecordSource = ''
    .RecordSource = 'ClassLook'
  ENDWITH
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Next
Reply
Map
View

Click here to load this message in the networking platform