Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh My Grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00519080
Message ID:
00519089
Views:
15
>Hello Everyone!!!
>I have a form that has a pageframe that has a grid.
>I have a button on the page that pulls information into a table called moneymove.dbf
>Every time the button is pressed I get a new result in my table. I want these changes to shown in my grid. I have never worked with a grid before, so I have no clue as to how to refresh the grid every time the table is refreshed.
>
>How can I get my grid to work?
>
>Thanks in advance

In the button click:
With ThisForm.PageFrame.Page1.Grid && use real control names
   local lcSource, laColumns[1], lnI
   lcSource = .RecordSource
   dimension laColumns[.ColumnCount]
   for lnI = 1 to .ColumnCount
       laColumns[lnI] = .columns[lnI].ControlSource
   endfor
   .RecordSource = ""
   * get new results in the table
   .RecordSource = lcSource
   for lnI = 1 to .ColumnCount
       .columns[lnI].ControlSource = laColumns[lnI]
   endfor
   .Refresh()
endwith
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform