in April 2017 this sample works .
The problem is :cEditPicture := "999999" when there are no records .
- Code: Select all Expand view
#include "fivewin.ch"
static oCn
function Main()
local oDlg, oFont, oBrw
local oStates, oCust
FW_SetUnicode( .f. )
if ( oCn := FW_DemoDB() ) == nil
return nil
endif
//oStates := oCn:RowSet( "states" ) // Create Parent
oStates := oCn:RowSet( "select * from states wher id = -1" ) // Create Parent
XBROWSE(oStates)
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 900,600 PIXEL TRUEPIXEL ;
FONT oFont ;
TITLE "FWH MYSQL PARENT CHILD ROWSET"
@ 20,20 XBROWSE oBrw SIZE 250,-20 PIXEL OF oDlg ;
DATASOURCE oStates ;
COLUMNS "Code" ; //, "Name" ;
COLSIZES nil ; // , 50 ;
CELL LINES NOBORDER
WITH OBJECT oBrw:InsCol(1)
:cHeader := "id"
:bEditValue := { || oStates:Fields( "ID" ):Value }
//:cEditPicture := "@ZE 999999.999"
:cEditPicture := "999999"
END
WITH OBJECT oBrw
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
ocn:close()
RETURN NIL
return nil
Regards Maurizio
www.nipeservice.com