Drop down menu 如何根据选项i'填充下拉列表;你在另一个下拉列表中做了什么?

Drop down menu 如何根据选项i'填充下拉列表;你在另一个下拉列表中做了什么?,drop-down-menu,powerbuilder,Drop Down Menu,Powerbuilder,我可以根据在另一个下拉列表中选择的值填充下拉列表吗? 例如:我有两个下拉列表。第一个包含选项A和选项B。如果选择OptionA,则第二个下拉列表将填充value1、value2、value3。如果我在第一个下拉列表中选择OptionB,则第二个下拉列表将填充status1、status2、status3 我该怎么做?谢谢 此代码位于我的ddlb_分区对象的“SelectionChanged”事件中。我有两个DDLB,DDLB分区和DDLB分区 int li_division_id int li_

我可以根据在另一个下拉列表中选择的值填充下拉列表吗? 例如:我有两个下拉列表。第一个包含选项A和选项B。如果选择OptionA,则第二个下拉列表将填充value1、value2、value3。如果我在第一个下拉列表中选择OptionB,则第二个下拉列表将填充status1、status2、status3

我该怎么做?谢谢

此代码位于我的ddlb_分区对象的“SelectionChanged”事件中。我有两个DDLB,DDLB分区和DDLB分区

int li_division_id
int li_section_id
string ls_section

SetPointer(HourGlass!)

//Clears the DDLBs
ddlb_section.Reset()

//Gets the Division ID
li_division_id = integer(Left(this.Text(index), 2))

//Cursor to gather the Sections under the selected Division
declare section cursor for
select section_id, section_name
    from tadtp_sections
    where division_id = :li_division_id;

//Open cursor
open section;

//Get first row of data
fetch section into :li_section_id, :ls_section;

//Loop while we have rows
do while(SQLCA.SQLCode = 0) 

  //Adds item to DDLB
  ddlb_section.AddItem(string(li_section_id, "00") + "     " + Trim(ls_section))

  //Gets next row
  fetch section into :li_section_id, :ls_section;

loop

//Close cursor
close section;

//Enables controls
ddlb_section.Enabled = true