Amigos, tengo un problema en el uso de TXBrowse. Puedo insertar una tabla con 2 columnas (código y descripción) la TXBrowse me muestra todos los datos, pero el último registro, cuando trato de hacer clic en él, se cambia la información de resgistro anteriormente. A continuación se presenta el código:
local CbRWTELA
cmd:="SELECT * FROM CADFAB_GESTAO ORDER by CODIGO LIMIT 20"
if (select("fabricante")= 0)
use sql (cmd) new shared alias fabricante
fabricante->(dbgotop())
endif
dbselectarea('fabricante') //SETA O ARQUIVO
define dialog frmtelacad resource ("TELACAD") of frmcadproduto color nRgb(0,0,0),RGB(102,153,255) Font Afont[16]
redefine say oSayPesTelaCad id 4004; oSayPesTelaCad:ltransparent:=.t.
CbRWTELA := TXBrowse():New(frmtelacad)
CbRWTELA:CreateFromResource( 4001 )
CbRWTELA:nMarqueeStyle := MARQSTYLE_HIGHLROW //MARQSTYLE_HIGHLCELL
CbRWTELA:bClrSelFocus := {|| { CLR_WHITE, nRGB( 000, 100, 255 ) } }
CbRWTELA:nHeaderLines := 1
CbRWTELA:nColDividerStyle := 1 //LINESTYLE_BLACK
CbRWTELA:nRowDividerStyle := 1 //LINESTYLE_BLACK
CbRWTELA:lAllowColSwapping := .T.
CbRWTELA:lAllowRowSizing := .T.
CbRWTELA:lHScroll := .T.
CbRWTELA:lColDividerComplete := .t.
CbRWTELA:lRecordSelector := .f.
//CbRWTELA:bClrSel:= {CLR_RED,CLR_BLACK}
CbRWTELA:SetRDD(.F.)
CbRWTELA:cAlias := ("fabricante")
CbRWTELA:l2007 = .T.
CbRWTELA:lFooter := .f.
//CbRWTELA:bKeyDown :={|nKey| iif(nKey=13,(lnew:='2',novoproduto()),nil)}
oCol:= CbRWTELA:AddCol()
oCol:bStrData := { || fabricante->codigo }
oCol:cHeader := 'Código'
oCol:nWidth := 110
oCol:= CbRWTELA:AddCol()
oCol:bStrData := { || fabricante->Descricao }
oCol:cHeader := 'Razão Social'
oCol:nWidth := 435
for nFor := 1 to 2
CbRWTELA:aCols[ nFor ]:blDClickData := {|r,c,f,o| (odbf:Fabric:=fabricante->codigo,mDescFabric:=fabricante->descricao, oCodFab:refresh(), oSayTextFabric:refresh(), oCodForn:setfocus(),oCodForn:refresh(), frmtelacad:end()) }
next
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()
activate dialog frmtelacad
!Gracias
Germano Solter
TXBrowse: error al hacer clic en el último registro.
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: TXBrowse: error al hacer clic en el último registro.
SQLRDD is not fully compatible with XBrowse. Still we shall try to help.
Please indicate the version of FWH you are using.
Please indicate the version of FWH you are using.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: TXBrowse: error al hacer clic en el último registro.
nageswaragunupudi wrote:SQLRDD is not fully compatible with XBrowse. Still we shall try to help.
Please indicate the version of FWH you are using.
Version: FWH/FWHX 11.12 29/December/2011
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: TXBrowse: error al hacer clic en el último registro.
Please try adding this line towards the end:
Please also remove these lines
I am not sure, but let us know if this works.
Code: Select all | Expand
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }Please also remove these lines
Code: Select all | Expand
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()
I am not sure, but let us know if this works.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: TXBrowse: error al hacer clic en el último registro.
nageswaragunupudi wrote:Please try adding this line towards the end:Code: Select all | Expand
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }
Please also remove these linesCode: Select all | Expand
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()
I am not sure, but let us know if this works.
ver el error: cuando hago clic en el último registro se cambia a la penúltima. esto sólo ocurre si hace clic con el ratón. si el teclado vai normal.
http://imageshack.us/clip/my-videos/51/6l3yijtufdmswwkkzlxzlx.mp4/
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: TXBrowse: error al hacer clic en el último registro.
Thanks. I see it.
Please see this posting in the English forums:
viewtopic.php?f=3&t=24327&p=141279#p141279
Please use this derived TQBrowse class and let me have your feedback.
I have tested myself and is working well.
Please feel free to ask for any support.
Please see this posting in the English forums:
viewtopic.php?f=3&t=24327&p=141279#p141279
Please use this derived TQBrowse class and let me have your feedback.
I have tested myself and is working well.
Please feel free to ask for any support.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: TXBrowse: error al hacer clic en el último registro.
nageswaragunupudi wrote:Please try adding this line towards the end:Code: Select all | Expand
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }
Please also remove these linesCode: Select all | Expand
CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()
I am not sure, but let us know if this works.
cuando trato de abrir el TXBrowse aparece este error:
