[Pb] dynamically add content from the drop-down list in the data window column

Source: Internet
Author: User

1. Set the style type of a column (dept_id) in the data window to dropdownlistbox:

Dw_1.modify ("dept_id.ddlb.case = 'any '")

2. Add data to the drop-down list box:

Boolean lb_flag = falsestring ls_facno, ls_facname, ls_valuedeclare cur_munit Dynamic Cursor for sqlsa; prepare sqlsa from "select distinct facno from secmemb where userno =? Order by facno "; open dynamic cur_munit using: userid; ls_value = colname +". Values = '~ T' "Fetch cur_munit into: ls_facno; do while sqlca. sqlcode = 0 ls_facno = trim (ls_facno) Select facname into: ls_facname from misunit where facno =: ls_facno; if not lb_flag then ls_value = colname + ". values = '"lb_flag = true else ls_value + ="/"end if ls_value + = trim (ls_facname) + "~ T "+ trim (ls_facno) Fetch cur_munit into: ls_facno; loopclose cur_munit; ls_value + =" '"If dwobj. Modify (ls_value) <>" "Then return-1

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.