when i select the first row it doesn't show only the data of the first row, it shows all the data of the table in the second datagrid
main screen
update screen edit first row
Add the following property to the form in the Init
ADDPROPERTY(Thisform,"returnobj", null )
in the edit button add the code
SELECT (thisform.Grid2.RecordSource) && selects the cursor area of the grid control.
Thisform.ReturnObj = Newobject("Empty")
SCATTER NAME thisform.ReturnObj
Thisform.Release()
In the UNLOAD event of the grid form
RETURN Thisform.ReturnedObj
when only selecting the second row when editing if the data of the second row appears in the second data grid
update screen edit second row
add this code to position the cursor in the first row of the datagrid, when selecting only the first row it appears in the second datagrid but it does not work. Create the property movefirstgrid and its default value will be .F in the form add to the click event
thisform.movefirstgrid=.T.
thisform.grdprices.setfocus
in the grid add to the setfocus event
if thisform.movefirstgrid
this.activatecell(1,1)
endif
thisform.movefirstgrid=.F.
in the second datagrid only the data of the first row is not show, shows all the data that the table has
main screen
update screen edit first row
Add the following property to the form in the Init
ADDPROPERTY(Thisform,"returnobj", null )
in the edit button add the code
SELECT (thisform.Grid2.RecordSource) && selects the cursor area of the grid control.
Thisform.ReturnObj = Newobject("Empty")
SCATTER NAME thisform.ReturnObj
Thisform.Release()
In the UNLOAD event of the grid form
RETURN Thisform.ReturnedObj
when only selecting the second row when editing if the data of the second row appears in the second data grid
update screen edit second row
add this code to position the cursor in the first row of the datagrid, when selecting only the first row it appears in the second datagrid but it does not work. Create the property movefirstgrid and its default value will be .F in the form add to the click event
thisform.movefirstgrid=.T.
thisform.grdprices.setfocus
in the grid add to the setfocus event
if thisform.movefirstgrid
this.activatecell(1,1)
endif
thisform.movefirstgrid=.F.
in the second datagrid only the data of the first row is not show, shows all the data that the table has