virtual grid + grid_edit
Posted: Wed Nov 10, 2021 1:25 pm
Hi,
I would like to use the virtual grid and and the grid_edit together, but when i change a cell value, it doesn't modify to the new value.
Is this possible at all?
(It works in general grid without virtual.)
I would like to use the virtual grid and and the grid_edit together, but when i change a cell value, it doesn't modify to the new value.
Is this possible at all?
(It works in general grid without virtual.)
Code: Select all
#include "hmg.ch"
Function Main
public aRows [21] [3]
aRows [1] := {'Simpson','Homer','555-5555'}
aRows [2] := {'Mulder','Fox','324-6432'}
aRows [3] := {'Smart','Max','432-5892'}
aRows [4] := {'Grillo','Pepe','894-2332'}
aRows [5] := {'Kirk','James','346-9873'}
aRows [6] := {'Barriga','Carlos','394-9654'}
aRows [7] := {'Flanders','Ned','435-3211'}
aRows [8] := {'Smith','John','123-1234'}
aRows [9] := {'Pedemonti','Flavio','000-0000'}
aRows [10] := {'Gomez','Juan','583-4832'}
aRows [11] := {'Fernandez','Raul','321-4332'}
aRows [12] := {'Borges','Javier','326-9430'}
aRows [13] := {'Alvarez','Alberto','543-7898'}
aRows [14] := {'Gonzalez','Ambo','437-8473'}
aRows [15] := {'Batistuta','Gol','485-2843'}
aRows [16] := {'Vinazzi','Amigo','394-5983'}
aRows [17] := {'Pedemonti','Flavio','534-7984'}
aRows [18] := {'Samarbide','Armando','854-7873'}
aRows [19] := {'Pradon','Alejandra','???-????'}
aRows [20] := {'Reyes','Monica','432-5836'}
aRows [21] := {'Fernández','two','0000-0000'}
FOR i = 1 TO 21
AADD (aRows[i],str(i))
NEXT
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 800 ;
HEIGHT 650 ;
TITLE "CELLNAVIGATION";
MAIN
@ 10,10 GRID Grid_1 ;
WIDTH 760 ;
HEIGHT 590 ;
HEADERS {'Last Name','First Name','Phone',"Num"} ;
WIDTHS {140,140,140,50};
ITEMS aRows ;
VALUE 1;
EDIT;
VIRTUAL; //works if you delete this line
ON QueryData QueryTest();
CELLNAVIGATION;
EDITOPTION GRID_EDIT_REPLACEALL
Form_1.Grid_1.ColumnCONTROL (4) := {"TEXTBOX", "NUMERIC",NIL,NIL}
Form_1.Grid_1.ColumnJUSTIFY (4) := GRID_JTFY_RIGHT
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
function QueryTest()
local i := this.queryrowindex
local j := this.querycolindex
this.querydata := aRows[ i, j ]
return nil