xbrowse y setcheck Mr Rao please

xbrowse y setcheck Mr Rao please

Postby wilsongamboa » Tue Mar 31, 2020 11:45 pm

Code: Select all  Expand view  RUN
#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
User avatar
wilsongamboa
 
Posts: 598
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Postby Ariel » Wed Apr 01, 2020 7:48 am

Wilson,

proba de ponerle :

:nEditType := EDIT_GET

Saludos.
Ariel
 
Posts: 376
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: xbrowse y setcheck Mr Rao please

Postby wilsongamboa » Wed Apr 01, 2020 12:56 pm

Ariel muchas gracias pero lamentablemente no funciono
saludos
Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
 
Posts: 598
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Postby armando.lagunas » Wed Apr 01, 2020 2:24 pm

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.
SkyPe: armando.lagunas@hotmail.com
Mail: armando.lagunas@gmail.com
User avatar
armando.lagunas
 
Posts: 346
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile

Re: xbrowse y setcheck Mr Rao please

Postby wilsongamboa » Thu Apr 02, 2020 4:50 pm

me he quedado con
Code: Select all  Expand view  RUN
   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: 598
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Postby wilsongamboa » Thu Apr 02, 2020 4:51 pm

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: 598
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Postby wilsongamboa » Thu Apr 02, 2020 4:54 pm

funciona belleza
Image
gracias
Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
 
Posts: 598
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: xbrowse y setcheck Mr Rao please

Postby nageswaragunupudi » Fri Apr 03, 2020 4:36 am

Code: Select all  Expand view  RUN
  WITH OBJECT oBrw:lCheck
      :SetLogical()
      :SetCheck( nil, .t. )
   END
 
Regards

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

Re: xbrowse y setcheck Mr Rao please

Postby wilsongamboa » Fri Apr 03, 2020 7:53 pm

Many Thanks Mr Rao
it's Works Good
best regards
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
 
Posts: 598
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests