cldatos := {"nombre","vend"}
cltitul := {"Codigo","Nombre"}
clpictur := {Nil,Nil}
clwinth := {40,360}
clfoter := {"Codigo","Nombre"}
clalidat := {"AL_LEFT","AL_LEFT"} //L,R,C
clalitit := {"AL_LEFT","AL_LEFT"}
clalogico := {" "," "}
clBmpData := {" "," "}
Tengo hago para que me tome el valor de todas las columnas , le hago seguimiento si cambia pero al mostar el browser el valor que toma en toma en todas las columnas es el ultimo valor tomado del For. en la matriz el valor "vend"
codigo inicial es esta menera funciona bien
- Code: Select all Expand view
cldatos := {"nombre","vend"}
cltitul := {"Codigo","Nombre"}
clpictur := {Nil,Nil}
clwinth := {40,360}
clfoter := {"Codigo","Nombre"}
clalidat := {"AL_LEFT","AL_LEFT"} //L,R,C
clalitit := {"AL_LEFT","AL_LEFT"}
clalogico := {" "," "}
clBmpData := {" "," "}
oLbx := TXBrowse():New( oDlgbrow )
::car_browse(oLbx,aContl[20],2 )
oCol := oLbx:AddCol()
oCol:bStrData := { || ::oDbfxls:vend } )
oCol:cHeader := "Codigo"
oCol:cFooter := " "
oCol:nWidth := 40
oCol:nHeadStrAlign := AL_LEFT //AL_RIGHT AL_CENTER
oCol:nDataStrAlign := AL_LEFT
oCol := oLbx:AddCol()
oCol:bStrData := { || ::oDbfxls:nombre }
oCol:cHeader := "Nombre"
oCol:cFooter := " "
oCol:nWidth := 360
oLbx:setdolphin(::oDbfxls, .F.)
oLbx:CreateFromResource( 4001 )
oDlgbrow:oClient := oLbx
Return Nil
De esta manera llenando los datos con una matriz al mostrar el browser el valor que toma en toma en todas las columnas es el ultimo valor tomado del For. en la matriz el valor "vend"
uso la funcion bs_browser para llenar los datos del xbrowser
- Code: Select all Expand view
cldatos := {"nombre","vend"}
cltitul := {"Codigo","Nombre"}
clpictur := {Nil,Nil}
clwinth := {40,360}
clfoter := {"Codigo","Nombre"}
clalidat := {"AL_LEFT","AL_LEFT"} //L,R,C
clalitit := {"AL_LEFT","AL_LEFT"}
clalogico := {" "," "}
clBmpData := {" "," "}
oLbx := TXBrowse():New( oDlgbrow )
::car_browse(oLbx,aContl[20],2 )
bs_browser(::oDbfxls,oCol,oLbx,cldatos,cltitul,clpictur,clwinth,clfoter,clalidat,clalitit,clalogico,clBmpData)
oLbx:setdolphin(::oDbfxls, .F.)
oLbx:CreateFromResource( 4001 )
oDlgbrow:oClient := oLbx
Return Nil
- Code: Select all Expand view
Esta es la funcion pero llena la matriz con el ultimo dato de la matriz el valor "vend"
es decir la columna nombe y vend las dos toman el valor de vend, como controlo esto,
Function bs_browser(oDbf,oCol,oLbx,cdat,ctit,cpic,cwin,cfot,calid,calit,clogi,cBmpD)
Local oDat,oDal
For i = 1 to len(cdat)
oDat := cdat[i]
oDal := clogi[i]
//ADD TO oLbx DATA { || nValue := bs_mostdato(oDbf,oDat," ",oDal) } HEADER ctit[i] ALIGN LEFT WIDTH 80
oCol := oLbx:AddCol()
oCol:bStrData := { || nValue := bs_mostdato(oDbf,oDat," ",oDal) } //RADAField("vend",::oDbfxls)
oCol:cHeader := ctit[i]
oCol:cFooter := cfot[i]
oCol:nWidth := cwin[i]
// oCol:nHeadStrAlign := bs_broaline(calit) //AL_LEFT AL_RIGHT AL_CENTER
// oCol:nDataStrAlign := bs_broaline(calid)
?oDat
Next
Return Nil