Hi Everybody,
I try to use grid instead of browse. I have a simple problem : the save function does not seem to work when using an array as ITEMS.
I define a Grid_1 in a Form_1 with an array aTest as ITEMS. I use EDIT to modify the values. It works on the screen. But when I try to save the new values with the save option : Form_1.Grid_1.save it does not modified the array aTest. I miss certainly something but I don't know what. Any help will be appeciated.
Save grid array
Moderator: Rathinagiri
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Save grid array
EDIT option only work with databasechrisjx2002 wrote:Hi Everybody,
I try to use grid instead of browse. I have a simple problem : the save function does not seem to work when using an array as ITEMS.
I define a Grid_1 in a Form_1 with an array aTest as ITEMS. I use EDIT to modify the values. It works on the screen. But when I try to save the new values with the save option : Form_1.Grid_1.save it does not modified the array aTest. I miss certainly something but I don't know what. Any help will be appeciated.
Code: Select all
aData := Array (Form_1.Grid_1.ItemCount, Form_1.Grid_1.ColumnCount)
For i:= 1 TO Form_1.Grid_1.ItemCount
For j:= 1 TO Form_1.Grid_1.ColumnCount
aData [i,j] := Form_1.Grid_1.Cell (i,j)
Next
Next
Re: Save grid array
Hola chrisjx2002
MSGDEBUG( Form_1.Grid_1.Item( Form_1.Grid_1.Value ) )
El array aTest es solo para iniciar el GRID con Informacion.
--------------------------------------------------------------------------
Hello chrisjx2002
MSGDEBUG( Form_1.Grid_1.Item( Form_1.Grid_1.Value ) )
The aTest array is just to start the GRID with information.
Por lo tanto solo tienes que tomar el renglon modificado:...It works on the screen...
MSGDEBUG( Form_1.Grid_1.Item( Form_1.Grid_1.Value ) )
El array aTest es solo para iniciar el GRID con Informacion.
--------------------------------------------------------------------------
Hello chrisjx2002
So you just have to take the changed row:...It works on the screen ...
MSGDEBUG( Form_1.Grid_1.Item( Form_1.Grid_1.Value ) )
The aTest array is just to start the GRID with information.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
-
- Posts: 190
- Joined: Wed Jan 06, 2010 5:39 pm
Re: Save grid array
Thanks Claudio for the tip. It works. I think it would be nice to have the save option for array too.