java 中级联插入失败,级联组合框无法正常工作

我有两个组合框(国家和国家) . 组合框2(状态)应使用组合框1(国家/地区)中选择的值加载关联国家 .

问题是,首次选择国家组合框项目,在第二个组合框中加载正确的关联状态 . 但是当在组合框1中选择另一个值时,组合框内的值仍显示旧值 .

NOTE:- 第二次在组合框2中正确加载NewValues . 但是单击组合框箭头时不显示这些值(仅显示旧值) . 但是如果我们在第二个组合框中键入任何内容,则会显示新值 .

QUESTION:- I want evertime the new values are loaded up in 2nd combo-box, it should be displayed on the click of combo-box arrow. Not just after typing something.

类:-

protected void Countries_SelectedIndexChanged(Object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)

{

int countryIDselected = Convert.ToInt32(Countries.SelectedValue);

bool AdvanceSearchFlag = true;

Session["AdvanceSearchFlag"] = AdvanceSearchFlag;

Session["countryIDselected"] = countryIDselected.ToString();

int totalStates = States.Items.Count;

int xyz = totalStates - 1; if (totalStates != 0)

{

while (totalStates > 0)

{

States.Items.Remove(totalStates - 1);

totalStates --;

}

}

States.Items.Clear();

}

protected void States_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)

{

foreach (StateyLookupInfo state in StateLookupList.GetList(false))

{

RadComboBoxItem item = new RadComboBoxItem(State.StateName, State.StateID.ToString());

comboBox.Items.Add(item);

}

}

ASPX: -

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值