FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour add new row in DBCOMBO
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
add new row in DBCOMBO
Posted: Sun Dec 18, 2016 04:49 PM

is possible to add new row in DBCOMBO

best regards

kajot
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: add new row in DBCOMBO
Posted: Sun Dec 18, 2016 06:49 PM
Yo lo hago asi...actualizo un array y luego reasigno el array al dbcombo...saludos... :-)

Code (fw): Select all Collapse
   aNPax1 := {"0"}
   aNPax2 := {"- Seleccione -"}

   REDEFINE DBCOMBO aGet[3] VAR aVar[3] ID 4002 OF oDlg UPDATE ;
      ITEMS aNPax1 ;
      LIST   aNPax2 ;

   aadd(aNPax1, "x")
   aadd(aNPax2, "nuevo valor")

   aGet[3]:aItems := aNPax1
   aGet[3]:aList := aNPax2

   aGet[3]:SetItems( aGet[3]:aItems, aGet[3]:aList, .t. )
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
Re: add new row in DBCOMBO
Posted: Sun Dec 18, 2016 07:18 PM

use slownik new shared via 'dbfcdx'
database oSLOWNIK

@ 40,  K4 DBCOMBO oOPIS VAR pOPIS ;
         alias oSLOWNIK:cALIAS;
         itemfield "Opis";
         listfield "Opis";            
         SIZE 120,100 PIXEL;
         of oDlg UPDATE

how add new record to database oSlownik from DBCOMBO, if has't it in DBCOMBO list

best regards

kajot
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: add new row in DBCOMBO
Posted: Sun Dec 18, 2016 07:32 PM
kajot wrote:use slownik new shared via 'dbfcdx'
database oSLOWNIK


@ 40, K4 DBCOMBO oOPIS VAR pOPIS ;
alias oSLOWNIK:cALIAS;
itemfield "Opis";
listfield "Opis";
SIZE 120,100 PIXEL;
of oDlg UPDATE


how add new record to database oSlownik from DBCOMBO, if has't it in DBCOMBO list


Using google translator:

I understand you wanted to add to dbcombo (is possible to add new row in DBCOMBO)

Itemfield "Opis" contains the field index and listfield "Opis" the value to display, try so oSLOWNIK-> your_field: = pOPIS and then oSLOWNIK: save ()
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
Re: add new row in DBCOMBO
Posted: Sun Dec 18, 2016 07:54 PM

ok

in DBCOMBO I see only list from oSlownik, I can not wite to pOPIS

best regards

kajot
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: add new row in DBCOMBO
Posted: Sun Dec 18, 2016 08:03 PM
kajot wrote:ok

in DBCOMBO I see only list from oSlownik, I can not wite to pOPIS


pOPIS is the variable that will contain the index value of the selected option in dbcombo and that would be the value you would save in your dbf, replacing your dbf field with the value of that variable

If you put in the dbcombo "on change alert (pOPIS)", you will see the selected value
Dios no está muerto...



Gracias a mi Dios ante todo!

Continue the discussion