while the combobox run ok ( change the oBrowse:cFilterFld and refresh the xbrowse)
when I digit a letter then the data is not searched
- Code: Select all Expand view
Function test()
local cSeek := Space( 100 )
local oGet
local oBrowse
....
@ 140,10 XBROWSE oBrowse ;
SIZE -20,-40 PIXEL;
OF oDlg ;
DATASOURCE oReserva COLUMNS aBrowse NOBORDER
PreGridReserva(oBrowse,oReserva,@oGet,@cSeek)
WITH OBJECT oBrowse
:MakeTotals()
:lfooter := .T.
:ldrawborder:=.t.
:nClrBorder := CLR_GRAY
:nMarqueeStyle := MARQSTYLE_HIGHLWIN7
:lHscroll := .F.
:l2007 := .F.
:l2015 := .T.
:lIncrFilter := .t.
:oSeek := oGet
:CreateFromCode()
END
PreGridReserva(oBrowse,oReserva,@oGet,@cSeek)
- Code: Select all Expand view
- STATIC Function PreGridReserva(oBrowse,oReserva,oGet,cSeek)
local cHead := "Numero"
local oCbx
oBrowse:nTopBarHeight := 60
oBrowse:SetStyle( 2015 )
oBrowse:bOnAdjust := <||
local aHead := {"Cognome","Nome","Tipo","Numero"} // ArrTranspose( aBrowse )[ 2 ]
local oSay1,oSay2
local nRow:= 20
@ nRow, 11 SAY oSay1 Prompt "Cerca:" SIZE 55, 24 PIXEL OF oBrowse
@ nRow, 375 SAY oSay2 Prompt "in:" SIZE 55, 24 PIXEL OF oBrowse
@ nRow,75 GET oGet VAR cSeek SIZE 200,24 PIXEL OF oBrowse;
BITMAP "GRID_CANCELLA" ACTION (cSeek := Space( 100 ),oBrowse:Seek( "" ),;
oBrowse:refresh(),oGet:refresh())
@ nRow, 400 COMBOBOX oCbx VAR cHead ITEMS aHead ;
SIZE 150,200 PIXEL OF oBrowse ;
ON CHANGE (SetIndexReserva(oCbx:NAT,oReserva),;
oBrowse:Seek( "" ), ;
oBrowse:cFilterFld := oBrowse:oCol( cHead ):cExpr, ;
oBrowse:refresh() ,;
oBrowse:SetFocus() )
return nil
>
return nil
where is the error ?