General information
Category:
Forms & Form designer
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only