Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro
  • Page:
  • 1

TOPIC:

select row datagrid and display in another datagrid 22 Oct 2022 00:24 #24243

  • iara84
  • iara84's Avatar
  • Topic Author


  • Posts: 1
  • 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

    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
    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

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1