Solved

Insert Items in ddlb of dw column

Posted on 2004-04-13
4
620 Views
Last Modified: 2013-12-26
Hi,

I have one column in my dw object with style as ddlb. I have not inserted any items in design time. I want to insert these items dynamically.
Please let me know the property to insert the items with display value and data value in that.

Thanks
Srinib
0
Comment
Question by:srinib
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 10819072
See SetValue, GetValue Functions

Example:
dw_employee.SetValue("emp_state", 3, "Texas")
string Status

Status = dw_employee.GetValue(7,3)

Regards
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 10819074
See SetValue, GetValue Functions

Example:
dw_employee.SetValue("emp_state", 3, "Texas")
string Status

Status = dw_employee.GetValue(7,3)

Regards
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 10820092
hi srinib,

u can set the values as follows....

dw_1.Object.status.Values = "Active~tA/Part Time~tP/Terminated~tT"


where,
Active,Part time and Terminated are the display values and...
A, P, T are the datavalues....and
status is the column on the dw which is ddlb....

u can use ur normal dot object notation in itemchanged or any event to get the value of column 'status'...


Cheers,
Rosh
0
 
LVL 8

Accepted Solution

by:
gajender_99 earned 50 total points
ID: 10821690
The following statements use a SQL cursor and FETCH statement to populate the ListBox portion of a DropDownListBox style column called product_col of a DataWindow object with code table values:

integer prod_code, i = 1

string prod_name

DECLARE prodcur CURSOR FOR
            SELECT product.name, product.code
            FROM product USING SQLCA;

CONNECT USING SQLCA;

IF SQLCA.SQLCode <> 0 THEN
            MessageBox("Status","Connect Failed " &
                  + SQLCA.SQLErrText)
            RETURN

END IF

OPEN prodcur;

IF SQLCA.SQLCode <> 0 THEN
            MessageBox("Status","Cursor Open Failed " &
                  + SQLCA.SQLErrText)
            RETURN

END IF

FETCH prodcur INTO :prod_name, :prod_code;

DO WHILE SQLCA.SQLCode = 0
            dw_products.SetValue("product_col", i, &
                  prod_name + "~t" + String(prod_code))
            i = i + 1
            FETCH prodcur INTO :prod_name, :prod_code;

LOOP

CLOSE prodcur;

DISCONNECT USING SQLCA;

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question