ComboBox loses list items after postback

2 posts, 0 answers
  1. Vijaya Sankar
    Vijaya Sankar avatar
    3 posts
    Member since:
    Jul 2012

    Posted 14 Jun 2011 Link to this post

    Hi,

    I am using RadAjaxPanel in master page as shown below:


    <
    telerik:RadAjaxPanel ID="rapContents" runat="server" EnableAJAX="true" OnAjaxSettingCreating="rapContents_AjaxSettingCreating">

     

     

     

    <asp:ContentPlaceHolder ID="phContents" runat="server">

     

     

     

    </asp:ContentPlaceHolder>

     

     

     

    </telerik:RadAjaxPanel>

     


    And in the content page I used a radcombobox, the code is below:

     

     

    <telerik:RadComboBox ID="rcbSP" runat="server" DataValueField="ID" DataTextField="Name"

     

     

     

    EmptyMessage="None" HighlightTemplatedItems="true" AllowCustomText="true" Width="180"

     

     

     

    OnClientDropDownClosed="onDropDownClosing"><ItemTemplate>

     

     

     

    <div onclick="StopPropagation(event)" class="combo-item-template">

     

     

     

    <asp:CheckBox runat="server" ID="chkSP" onclick="onCheckBoxClick(this, 'SP')" />

     

     

     

    <asp:Label runat="server" ID="lblSP" AssociatedControlID="chkSP">

     

    <%

     

    # Eval("Name")%>

     

     

     

     

    </asp:Label>

     

     

     

    </div>

     

     

     

    </ItemTemplate>

     

     

     

    </telerik:RadComboBox>

     


     

     

    //Combobox Binding - only binding first time the page loads

     

     

     

    this.rcbSP.DataSource = LU_ServerPurposeBLL.GetList(false);

     

     

     

     

    this.rcbSP.DataBind();

     


    Now my issue is, when I have a postback in the content page, the data (list items) in the combobox is lost and displaying "None" (the empty message).

    Please help me in resolving the issue. Thanks in advance.

     

     

     

  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 21 Jun 2011 Link to this post

    Hello Vijaya Sankar,

    Did you try to set EnableAjax to false and see how the control behaves? In case this does not help and since it is a customized scenario I would suggest that you open a support ticket and send us a simple runnable project with the reproduced issue so we can test it locally and help you out.

    Regards,
    Kate
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top