2012-05-08 3 views
1

두 개의 콤보 상자 (국가 및 주)가 있습니다. 콤보 상자 2 (상태)는 연결된 국가를 콤보 상자 1 (국가)에서 선택한 값으로로드해야합니다.계단식 콤보 상자가 제대로 작동하지 않습니다.

문제는 국가 콤보 상자 항목을 처음 선택하면 두 번째 콤보 상자에 올바른 연결된 상태가로드된다는 것입니다. 그러나 콤보 상자에서 다른 값을 선택하면 1. 콤보 상자 안의 값에는 여전히 이전 값이 표시됩니다.

참고 : - 참고 : - 두 번째로 NewValues가 콤보 상자 2에 제대로로드됩니다. 그러나 콤보 상자 화살표를 클릭하면 이전 값만 표시됩니다. 그러나 두 번째 콤보 상자에 아무 것도 입력하면 새 값이 표시됩니다.

질문 : - 두 번째 콤보 상자에 새로운 값이로드되면 잔액 상자에 클릭하여 표시해야합니다. 그냥 뭔가를 입력 한 후.

등급 (class) : -

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 : -

<telerik:RadComboBox ID="Countries" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Countries_SelectedIndexChanged" /> 
<telerik:RadComboBox ID="States" runat="server" AutoPostBack="True" EnableLoadOnDemand="true" OnItemsRequested="States_ItemsRequested" /> 
+0

일부 도움말 PLZ – Kings

답변

0

당신이 EnableLoadOnDemand이 = "false"로 설정하려고 있나요?

+0

예. 그것은 변화를 가져 오지 않았습니다. – Kings

+0

@Kingz AllowCustomText = "false"는 어떻게 설정합니까? –

관련 문제