RadDropDownList OnItemSelected is clearing the RadSplitter

2 posts, 0 answers
  1. Erick
    Erick avatar
    8 posts
    Member since:
    May 2015

    Posted 25 Jun 2015 Link to this post

    I have a RadSplitter with two Pane and one SplitBar. On one Pane I have a dropdownlist, which when selected should change a textbox visibility to true. However it is completely clearing both RadPanes and not displaying anything.


    Here is the code:

    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%">
                        <telerik:RadPane ID="LeftPane" runat="server" Width="75%">
                        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Backward">
                        <telerik:RadPane ID="RightPane" runat="server" Width="25%">
                            <div style="padding-left:10px; padding-right:10px;padding-top:5px;">
                                <hr style="width:100%;" />
                                        <td><asp:Label ID="lblCustomer" runat="server" Text="Customer #"></asp:Label></td>
                                        <td><telerik:RadDropDownList ID="ddlCustomer" runat="server" AutoPostBack="true" DefaultMessage="Select One.." OnItemSelected="ddlCustomer_ItemSelected"></telerik:RadDropDownList></td>
                                        <td><telerik:RadTextBox ID="txtCust" runat="server" AutoPostBack="true" Visible="false"></telerik:RadTextBox></td>




    protected void Page_Load(object sender, EventArgs e)
                if (!Page.IsPostBack)
                    ddlCustomer.DataSource = new List<string>() { "Cust1", "Cust2" };
            protected void ddlCustomer_ItemSelected(object sender, Telerik.Web.UI.DropDownListEventArgs e)
                if (ddlCustomer.SelectedItem != null)
                    txtCust.Visible = true;


    Am I missing something?

  2. Erick
    Erick avatar
    8 posts
    Member since:
    May 2015

    Posted 26 Jun 2015 in reply to Erick Link to this post

    Figured it out. Instead of using <telerik:RadAjaxPanel...> you need to wrap it in <asp:UpdatePanel...



    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <telerik:RadSplitter ID="RadSplitter1" runat="server">
                     //Do stuff

Back to Top