Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can we have a grid on a memory array instead of a table
Message
From
17/12/1998 12:29:09
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00168189
Message ID:
00168562
Views:
27
>Is it possible to have a grid to affect a memory array instead of a table ?
>
>( ) I want to do a header-detail form with a single save button for the user to save both the header record and the multiple detail records. I would like to read the detail records into a memory array, have the user change it using a grid, and when he press the save-button, apply the changes from the array into the table.

Yes, you may, but it's sorta tricky. You should:

1. Create a DUMMY cursor with as many records as rows in the array. Set the Grid.RecordSource to it.

2. Set all ColumnNNN.Bound to .F.. (If you don't do this, the Column.TextBox will set itself to ReadOnly.) I also set ColumnNNN.Sparse to .F..

3. Set all ColumnNNN.Text1.ControlSource to ARRAY(RECNO("DUMMY"),NNN). (This is particularly tricky!)

It works!
Previous
Reply
Map
View

Click here to load this message in the networking platform