我有两个组合框(国家和国家) . 组合框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: -