Page 1 of 1

TXBrowse: error al hacer clic en el último registro.

PostPosted: Tue Mar 05, 2013 12:40 pm
by nixbeau
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

Re: TXBrowse: error al hacer clic en el último registro.

PostPosted: Tue Mar 05, 2013 4:18 pm
by nageswaragunupudi
SQLRDD is not fully compatible with XBrowse. Still we shall try to help.
Please indicate the version of FWH you are using.

Re: TXBrowse: error al hacer clic en el último registro.

PostPosted: Mon Mar 11, 2013 12:36 pm
by nixbeau
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

Re: TXBrowse: error al hacer clic en el último registro.

PostPosted: Mon Mar 11, 2013 2:21 pm
by nageswaragunupudi
Please try adding this line towards the end:
Code: Select all  Expand view
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }

Please also remove these lines
Code: Select all  Expand view

CbRWTELA:refresh()
CbRWTELA:gotop()
CbRWTELA:refresh()
 

I am not sure, but let us know if this works.

Re: TXBrowse: error al hacer clic en el último registro.

PostPosted: Mon Mar 11, 2013 5:10 pm
by nixbeau
nageswaragunupudi wrote:Please try adding this line towards the end:
Code: Select all  Expand view
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }

Please also remove these lines
Code: Select all  Expand view

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/

Re: TXBrowse: error al hacer clic en el último registro.

PostPosted: Mon Mar 11, 2013 6:17 pm
by nageswaragunupudi
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.

Re: TXBrowse: error al hacer clic en el último registro.

PostPosted: Tue Mar 12, 2013 1:56 pm
by nixbeau
nageswaragunupudi wrote:Please try adding this line towards the end:
Code: Select all  Expand view
CbRWTELA:bKeyCount := { (CbRWTELA:cAlias)->(OrdKeyCount()) }

Please also remove these lines
Code: Select all  Expand view

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:

Image