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

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

Postby nixbeau » Tue Mar 05, 2013 12:40 pm

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
nixbeau
 
Posts: 28
Joined: Sun Jan 08, 2012 6:17 pm

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

Postby nageswaragunupudi » Tue Mar 05, 2013 4:18 pm

SQLRDD is not fully compatible with XBrowse. Still we shall try to help.
Please indicate the version of FWH you are using.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10347
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby nixbeau » Mon Mar 11, 2013 12:36 pm

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
nixbeau
 
Posts: 28
Joined: Sun Jan 08, 2012 6:17 pm

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

Postby nageswaragunupudi » Mon Mar 11, 2013 2:21 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10347
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby nixbeau » Mon Mar 11, 2013 5:10 pm

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/
nixbeau
 
Posts: 28
Joined: Sun Jan 08, 2012 6:17 pm

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

Postby nageswaragunupudi » Mon Mar 11, 2013 6:17 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10347
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby nixbeau » Tue Mar 12, 2013 1:56 pm

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
nixbeau
 
Posts: 28
Joined: Sun Jan 08, 2012 6:17 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests