xbrowse y setcheck Mr Rao please

Post Reply
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

xbrowse y setcheck Mr Rao please

Post by wilsongamboa »

Code: Select all

#include "fivewin.ch"

function Main()

   local oCn, oRs, oDlg, oBrw
   oCn  := FW_DemoDB() //FW_OpenAdoConnection( aCredentials, .T. )
   oRs  := oCn:RowSet( "SELECT false AS lCheck, code, name FROM states where 1 " )
   

   DEFINE DIALOG oDlg SIZE 1000,600 PIXEL TRUEPIXEL
   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE oRs AUTOCOLS CELL LINES NOBORDER

   WITH OBJECT oBrw:lCheck
      :SetLogical()
      :SetCheck()
   END
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

return nil
buenas tardes
Este codigo funciona me presenta la primera columna pero no marca ni con el mouse ni con la tecla SPACE
agradeceria si alguien sabe que me esta faltando
gracias por su ayuda
Att

Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Ariel
Posts: 309
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: xbrowse y setcheck Mr Rao please

Post by Ariel »

Wilson,

proba de ponerle :

:nEditType := EDIT_GET

Saludos.
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Post by wilsongamboa »

Ariel muchas gracias pero lamentablemente no funciono
saludos
Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
armando.lagunas
Posts: 340
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile
Contact:

Re: xbrowse y setcheck Mr Rao please

Post by armando.lagunas »

generalmente los valores verdaderos o falsos de una base de datos son con un campo "BIT", en donde es:

0 = FALSE
1 = VERDADERO

entonces para que el check del oBrw funcione debes convertir el campo a .T. o .F.

0 = .F.
1 = .T.
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Post by wilsongamboa »

me he quedado con

Code: Select all

    WITH OBJECT oBrw:aCols[ 1 ]
       :SetLogical()
       :SetCheck()
       :bEditValue    := { || ascan( oBrw:aSelected, oBrw:BookMark ) > 0 }
    END
    oBrw:nMarqueeStyle    := MARQSTYLE_HIGHLROWMS
 
funciona belleza
saludos
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Post by wilsongamboa »

Muchas gracias Armando y Ariel de sus consejos puse hallar la solucion
Gracias
saludos
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Post by wilsongamboa »

funciona belleza
Image
gracias
Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: xbrowse y setcheck Mr Rao please

Post by nageswaragunupudi »

Code: Select all

   WITH OBJECT oBrw:lCheck
      :SetLogical()
      :SetCheck( nil, .t. )
   END
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
wilsongamboa
Posts: 439
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Post by wilsongamboa »

Many Thanks Mr Rao
it's Works Good
best regards
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Post Reply