I have a recordset where the field "lastlog" ( Last Login ) could be nil .. instead of xBrowse showing the cell value as nil I would prefer "00/00/0000" ... here is the code :
- Code: Select all Expand view
DEFINE ICON oICO RESOURCE "SCANNER"
DEFINE WINDOW oUser ;
FROM 2,2 to 25,65 ;
of oWndMDI ;
TITLE "USERINFO Administrative Browse" ;
MENU BuildMenu(oRsUser) ;
ICON oICO ;
NOMINIMIZE ;
NOZOOM ;
MDICHILD
@ 0, 0 xBROWSE oBrow of oUser ;
RECORDSET oRsUser ;
COLUMNS "USERID", ;
"READ", ;
"WRITE", ;
"MGR", ;
"SUPER", ;
"lastlog" ;
COLSIZES 90,60,60,60,60,100 ;
HEADERS "Userid", ;
"Read", ;
"Write", ;
"ProjMgr", ;
"Super", ;
"Last Login" ;
AUTOSORT AUTOCOLS LINES CELL
oUSER:oClient := oBrow
oBrow:bLDblClick := { |nRow,nCol | _Userview( "V", oRsUser ) }
oBrow:CreateFromCode()
ACTIVATE WINDOW oUser ;
ON INIT( oBrow:SetFocus(), .F. );
VALID ( IIF( !lOK, UserClose(.T., oRsUser), .F. ))
RETURN( NIL )