In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

DbComBox, DbRadioMenu, DataSet

Xailer English public forum
Responder
Avatar de Usuario
Hurricane
Mensajes: 278
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

DbComBox, DbRadioMenu, DataSet

Mensaje por Hurricane »

Hi Team

To simplify a part of the development (extremely important), please:
  1. a small adjustment in DBComboBox (bound), start empty (index=0) when in addNew mode, like other nDataTypes.
  2. is it possible to implement the onLoaded event for DataSet? to be triggered after we call :edit() or :addNew().
    After these methods are called, we cannot make adjustments to controls, etc. from within the Form coding (only from the outside)
  3. is it possible to implement aItemsBound for DBRadioMenu?
-----
Can I send all the code to your email?
  1. I made the adjustment (DBComboBox).
  2. I made a simple adaptation (DataSet/dbfDataSet). I added DATA bLoaded, etc...
  3. I made the implementation (partial/DBRadioMenu). It only works when adding/changing, but when browsing records the control is not updated.
Practical use:

Código: Seleccionar todo

METHOD FormInitialize( oSender ) CLASS TFrmCliente

   ::oRSMain:bLoaded:={|o|::ModeAppend(o)} // Initializing here (while there is no event)
   ::oRMTipoPessoa:aItemsBound:={'J', 'F'}
   ::oFpPrincipal:Select()
   RETURN Nil

METHOD ModeAppend(oDs) CLASS TFrmCliente
   
   if oDs:lOnAppend
      ::oRMTipoPessoa:nIndex:=1 // 1-JURIDICA, 2-FISICA
      ::oRMTipoPessoa:OnChange()

   else //if oDs:lOnEdit
      ::oRMTipoPessoa:Disable() 
      ::oRMTipoPessoa:OnChange()

   endif

   RETURN NIL
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9439
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: DbComBox, DbRadioMenu, DataSet

Mensaje por ignacio »

Dear Sir,

We encourage to overload Classes for this purpose. It's really simple. If you need some advice, just let us know.

Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 278
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: DbComBox, DbRadioMenu, DataSet

Mensaje por Hurricane »

Hi,
But is it possible to fix the DbComboBox (bound)? It starts incorrectly in inclusion mode and if the field is empty.
This is simple to fix and extremely important for all users (that's why I posted it). I made the fix and it works great.

How do I implement aItemsBound in aDbRadioMenu and have it updated during navigation? (I tried).

Usage example:
::oRmTipo:aItemsBound:={'J', 'F'}
::oRmTipo:aItems:={'Jurídica', 'Física'}

I attached a simple project
ignacio escribió: Jue Feb 06, 2025 11:44 am We encourage to overload Classes for this purpose. It's really simple. If you need some advice, just let us know.
Regards
Adjuntos
dbRmTest.zip
(5.46 KiB) Descargado 447 veces
Developments | Trainings | Projects
Site | E-mail | Messenger | YouTube
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9439
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: DbComBox, DbRadioMenu, DataSet

Mensaje por ignacio »

a small adjustment in DBComboBox (bound), start empty (index=0) when in addNew mode, like other nDataTypes.
This can brake actual code, sorry.
is it possible to implement the onLoaded event for DataSet? to be triggered after we call :edit() or :addNew().
OK. It will be called OnRecordLoad()
is it possible to implement aItemsBound for DBRadioMenu?
Yes, but I do not think is necessary. I do not like the idea of having aItemsBound for every ordinal dataset value.

Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 278
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: DbComBox, DbRadioMenu, DataSet

Mensaje por Hurricane »

ignacio escribió: Vie Feb 07, 2025 9:52 am This can brake actual code, sorry.
Easy:

Código: Seleccionar todo

if ::nDataType = dtBOUNDEMPTY .and. ...
-------
ignacio escribió: Vie Feb 07, 2025 9:52 am OK. It will be called OnRecordLoad()
excellent. Thank you.
-------
aItemsBound for DBRadioMenu - How can I implement this to use in my application?
including making the control refresh on record navigation, according to ::aItemsBound
I attached a small project.

Regards,
Developments | Trainings | Projects
Site | E-mail | Messenger | YouTube
Responder