add new row in DBCOMBO

add new row in DBCOMBO

Postby kajot » Sun Dec 18, 2016 4:49 pm

is possible to add new row in DBCOMBO
best regards
kajot
User avatar
kajot
 
Posts: 339
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: add new row in DBCOMBO

Postby joseluisysturiz » Sun Dec 18, 2016 6:49 pm

Yo lo hago asi...actualizo un array y luego reasigno el array al dbcombo...saludos... :shock:

Code: Select all  Expand view

   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!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: add new row in DBCOMBO

Postby kajot » Sun Dec 18, 2016 7: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
User avatar
kajot
 
Posts: 339
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: add new row in DBCOMBO

Postby joseluisysturiz » Sun Dec 18, 2016 7: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!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: add new row in DBCOMBO

Postby kajot » Sun Dec 18, 2016 7:54 pm

ok

in DBCOMBO I see only list from oSlownik, I can not wite to pOPIS
best regards
kajot
User avatar
kajot
 
Posts: 339
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: add new row in DBCOMBO

Postby joseluisysturiz » Sun Dec 18, 2016 8: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!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 109 guests