RadListBox disappearing after postback

8 posts, 0 answers
  1. Dave
    Dave avatar
    9 posts
    Member since:
    Jan 2011

    Posted 04 Jan 2011 Link to this post

    I have a series of panels in my app.  In one of them, there are some pairs of RadListBoxes, as well as some other Telerik controls.  What's happening is I have a LinkButton which opens the panel containing the Telerik controls via an AJAX call.  This shows the panel and hides the others.  The controls all load fine.  I can interact with the controls via AJAX no problem.  The snag occurs when I click on a button I have set to override the AJAX call and perform a full-page postback, hiding the current panel and showing the original one.  When I click the LinkButton again to show the panel containing the RadListBoxes, they don't render, I only see what looks like an unordered list of the listbox items.  This is also happening with some RadComboBox items.  Please advise.  Thanks.
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 07 Jan 2011 Link to this post

    Hello Dave,

    Unfortunately we couldn't reproduce the problem you are experiencing. Could you be more specific what exactly is your scenario or give us the code your are using.
    I've prepared a small example page showing that there is now problem with listboxes placed in Panel which is  visualized using ajax or normal postback.

    Regards,
    Dimitar Terziev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dave
    Dave avatar
    9 posts
    Member since:
    Jan 2011

    Posted 07 Jan 2011 Link to this post

    Dimitar,

    Thanks for your reply.  I have used RadListBoxes without issue on other apps.  This one is particular is a unique scenario.  I have a master page which links to this particular page.  On this page is an outer pnael panel which contains all the content.  Within this panel are two more panels we will call panel one and panel two.  Panel one is open by default while panel two is hidden.  When you click on a LinkButton outside of both panels, panel one hides and panel two becomes visible.  Everything loads fine at this point.  There is a cancel button in panel 2.  When clicked, panel two hides and panel one shows via a full page postback.  No problems yet.  Now, if I click the LinkButton again to open panel two, that's when the RadListBoxes appear as bulletted lists of text instead of the actual controls.  Code here:

    <asp:Panel ID="pnlClasses" runat="server" HorizontalAlign="Left" CssClass="PagePanel">
        <br />
        <br />
        <asp:Label ID="lblPageHeader" runat="server" Text="CLASSES" CssClass="PageHeader"></asp:Label>
        <asp:LinkButton ID="lbCreateClass" runat="server" CssClass="FormLabel">Create New Class</asp:LinkButton>
        <br />
        <asp:Panel ID="pnlClassesContent" runat="server">
            <asp:Panel ID="pnlRecentClasses" runat="server">
                <asp:Label ID="lblRecentClasses" runat="server" Text="My Recent Classes" CssClass="FormLabel"></asp:Label
                <asp:Label ID="Label1" runat="server" CssClass="FormLabel" Text="View"></asp:Label> <asp:LinkButton
                    ID="lbRC5" runat="server" CssClass="FormLabel">5</asp:LinkButton
                <asp:LinkButton ID="lbRC10" runat="server" CssClass="FormLabel">10</asp:LinkButton
                <asp:LinkButton ID="lbRCAll" runat="server" CssClass="FormLabel">All</asp:LinkButton>
                 <telerik:RadGrid ID="gvRecentClasses" runat="server" AutoGenerateColumns="False"
                    GridLines="None" Skin="Black" AllowSorting="True" DataSourceID="sdsRecentClasses">
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                    </HeaderContextMenu>
                    <MasterTableView>
                        <CommandItemSettings ExportToPdfText="Export to Pdf" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column column" HeaderText="Edit"
                                UniqueName="Edit">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl="Images/buttons/document_edit.ico" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column1 column" HeaderText="Copy"
                                UniqueName="Copy">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnCopy" runat="server" ImageUrl="Images/buttons/btn_copy.gif" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column2 column" HeaderText="View"
                                UniqueName="View">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnView" runat="server" ImageUrl="~/Images/buttons/document_view1.gif" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column3 column" HeaderText="Close"
                                UniqueName="Close">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnClose" runat="server" ImageUrl="Images/buttons/btn_rosterOpen.gif" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="CourseCode" FilterControlAltText="Filter column4 column"
                                HeaderText="Course" UniqueName="CourseCode">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ClassID" FilterControlAltText="Filter column5 column"
                                HeaderText="Class ID" UniqueName="ClassID">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ClassName" FilterControlAltText="Filter column6 column"
                                HeaderText="Class Name" UniqueName="ClassName">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column7 column" HeaderText="Audience"
                                UniqueName="Audience">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="StartDate" FilterControlAltText="Filter column8 column"
                                HeaderText="Start Date" UniqueName="StartDate">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EndDate" FilterControlAltText="Filter column9 column"
                                HeaderText="End Date" UniqueName="EndDate">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Location" FilterControlAltText="Filter column10 column"
                                HeaderText="Location/Metro Area" UniqueName="Location">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="instName" FilterControlAltText="Filter column11 column"
                                HeaderText="Instructor" UniqueName="Instructor">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="classstatus" FilterControlAltText="Filter column12 column"
                                HeaderText="Status" UniqueName="Status">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DateClassCreated" FilterControlAltText="Filter column13 column"
                                HeaderText="Date Created" UniqueName="DateCreated">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>
            </asp:Panel>
            <asp:Panel ID="pnlUpcomingClasses" runat="server">
                <asp:Label ID="lblUpcomingClasses" runat="server" Text="My Upcoming Classes" CssClass="FormLabel"></asp:Label
                <asp:Label ID="Label2" runat="server" CssClass="FormLabel" Text="View"></asp:Label> <asp:LinkButton
                    ID="lbUC5" runat="server" CssClass="FormLabel">5</asp:LinkButton
                <asp:LinkButton ID="lbUC10" runat="server" CssClass="FormLabel">10</asp:LinkButton
                <asp:LinkButton ID="lbUCAll" runat="server" CssClass="FormLabel">All</asp:LinkButton>
                <telerik:RadGrid ID="gvUpcomingClasses" runat="server" AutoGenerateColumns="False"
                    GridLines="None" Skin="Black" AllowSorting="True" DataSourceID="sdsUpcomingClasses">
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                    </HeaderContextMenu>
                    <MasterTableView>
                        <CommandItemSettings ExportToPdfText="Export to Pdf" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column column" HeaderText="Edit"
                                UniqueName="Edit">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl="Images/buttons/document_edit.ico">
                                    </asp:ImageButton>
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column1 column" HeaderText="Copy"
                                UniqueName="Copy">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnCopy" runat="server" ImageUrl="Images/buttons/btn_copy.gif" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column2 column" HeaderText="View"
                                UniqueName="View">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnView" runat="server" ImageUrl="~/Images/buttons/document_view1.gif" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column3 column" HeaderText="Close"
                                UniqueName="Close">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnClose" runat="server" ImageUrl="Images/buttons/btn_rosterOpen.gif" />
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column4 column" HeaderText="Course"
                                UniqueName="CourseCode" DataField="CourseCode">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column5 column" HeaderText="Class ID"
                                UniqueName="ClassID" DataField="ClassID">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column6 column" HeaderText="Class Name"
                                UniqueName="ClassName" DataField="ClassName">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn FilterControlAltText="Filter column7 column" HeaderText="Audience"
                                UniqueName="Audience">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column8 column" HeaderText="Start Date"
                                UniqueName="StartDate" DataField="StartDate">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column9 column" HeaderText="End Date"
                                UniqueName="EndDate" DataField="EndDate">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column10 column" HeaderText="Location/Metro Area"
                                UniqueName="Location" DataField="Location">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column11 column" HeaderText="Instructor"
                                UniqueName="Instructor" DataField="instName">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column12 column" HeaderText="Status"
                                UniqueName="Status" DataField="classstatus">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column13 column" HeaderText="Date Created"
                                UniqueName="DateCreated" DataField="DateClassCreated">
                                <HeaderStyle Wrap="False" />
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>
            </asp:Panel>
        </asp:Panel>
        <asp:Panel ID="pnlEditClass" runat="server" Visible="False">
            <table border="0" align="center" cellpadding="2" cellspacing="2" id="tblClasses"
                runat="server">
                <tr id="Tr1" runat="server">
                    <td align="center" runat="server">
                          
                        <p>
                            <asp:Label ID="Label3" runat="server" CssClass="FormLabel" Text="Class ID" />
                            <br />
                            <asp:Label ID="lblClassID" runat="server" CssClass="FormLabel"></asp:Label>
                             </p>
                    </td>
                    <td id="Td1" align="center" runat="server">
                        <asp:Label ID="Label4" runat="server" CssClass="FormLabel" Text="Group*"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlGroup" runat="server" AutoPostBack="True" CausesValidation="False">
                        </telerik:RadComboBox>
                          
                        <asp:RequiredFieldValidator ID="reqGroup" runat="server" ControlToValidate="ddlGroup"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Group" SetFocusOnError="True"
                            ForeColor="" InitialValue="--Select Group--"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr runat="server">
                    <td align="center" id="Td4" runat="server">
                        <asp:Label ID="Label5" runat="server" CssClass="FormLabel" Text="Audience*"></asp:Label>
                        <br />
                        <telerik:RadListBox ID="lbAllAudience" runat="server" AllowTransfer="True" TransferToID="lbAudience"
                            AllowTransferOnDoubleClick="True" Height="200px" Width="200px" SelectionMode="Multiple"
                            EnableViewState="True">
                            <ButtonSettings TransferButtons="All" />
                        </telerik:RadListBox>
                        <telerik:RadListBox ID="lbAudience" runat="server" AllowTransfer="True" TransferToID="lbAllAudience"
                            AllowTransferOnDoubleClick="True" Height="200px" Width="200px" SelectionMode="Multiple"
                            OnClientTransferred="itemTransferred" EnableViewState="True">
                            <ButtonSettings TransferButtons="All" />
                        </telerik:RadListBox>
                        <br />
                        <asp:RequiredFieldValidator ID="reqAudience" runat="server" ControlToValidate="lbAudience"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Class Audiences"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                          
                    </td>
                    <td align="center" id="Td6" runat="server">
                        <asp:Label ID="Label6" runat="server" CssClass="FormLabel" Text="Course Template*"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlCourse" runat="server" NoWrap="True" Width="500px" AutoPostBack="True"
                            CausesValidation="False">
                        </telerik:RadComboBox>
                          
                        <asp:RequiredFieldValidator ID="reqCourse" runat="server" ControlToValidate="ddlCourse"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Course Template"
                            ForeColor="" InitialValue="--Select Course Template--" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="Tr3" runat="server">
                    <td align="center" id="Td8" runat="server">
                        <asp:Label ID="Label7" runat="server" CssClass="FormLabel" Text="Class Name*"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtClassName" runat="server" Width="500px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqClassName" runat="server" ControlToValidate="txtClassName"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Enter Class Name"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                    <td align="center" id="Td10" runat="server">
                        <asp:Label ID="Label8" runat="server" CssClass="FormLabel" Text="Use Course Description"></asp:Label>
                        <br />
                        <asp:CheckBox ID="cbDescAsCourse" runat="server" Checked="True" />
                    </td>
                </tr>
                <tr id="Tr4" runat="server">
                    <td colspan="2" align="center">
                        <asp:Label ID="Label9" runat="server" CssClass="FormLabel" Text="Class Description*"></asp:Label>
                    </td>
                </tr>
                <tr id="Tr5" runat="server">
                    <td colspan="2" align="center">
                        <telerik:RadEditor ID="reClassDesc" runat="server" CssClass="ClassesEditor" Skin="Black"
                            ContentAreaCssFile="~/Styles/RadEditor.css" EditModes="Design" Enabled="true"
                            Width="629px" Height="260" ToolbarMode="ShowOnFocus" EnableResize="false" ToolsWidth="601px">
                            <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorTool Name="Cut" />
                                    <telerik:EditorTool Name="Copy" />
                                    <telerik:EditorTool Name="Paste" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="FontName" />
                                    <telerik:EditorTool Name="FontSize" />
                                    <telerik:EditorTool Name="ForeColor" />
                                    <telerik:EditorTool Name="BackColor" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="Bold" />
                                    <telerik:EditorTool Name="Italic" />
                                    <telerik:EditorTool Name="Underline" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="JustifyLeft" />
                                    <telerik:EditorTool Name="JustifyCenter" />
                                    <telerik:EditorTool Name="JustifyRight" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertOrderedList" />
                                    <telerik:EditorTool Name="InsertUnorderedList" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertLink" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="TableWizard" />
                                </telerik:EditorToolGroup>
                            </Tools>
                            <Content>
                            </Content>
                        </telerik:RadEditor>
                    </td>
                </tr>
                <tr id="Tr6" runat="server">
                    <td align="center" id="tdStartDate" runat="server">
                        <asp:Label ID="Label10" runat="server" CssClass="FormLabel" Text="Class Start Date/Time*"></asp:Label>
                        <br />
                        <telerik:RadDateTimePicker ID="rdpStartDate" runat="server" Culture="English (United States)"
                            MaxDate="2011-12-31" MinDate="">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                            </Calendar>
                            <TimeView CellSpacing="-1">
                            </TimeView>
                            <TimePopupButton HoverImageUrl="" ImageUrl="" />
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                            <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
                            </DateInput>
                        </telerik:RadDateTimePicker>
                        <asp:RequiredFieldValidator ID="reqStartDate" runat="server" ControlToValidate="rdpStartDate"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Start Date/Time"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                    <td align="center" id="tdEndDate" runat="server">
                        <asp:Label ID="Label11" runat="server" CssClass="FormLabel" Text="Class End Date/Time*"></asp:Label>
                        <br />
                        <telerik:RadDateTimePicker ID="rdpEndDate" runat="server">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                            </Calendar>
                            <TimeView CellSpacing="-1">
                            </TimeView>
                            <TimePopupButton HoverImageUrl="" ImageUrl="" />
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                            <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
                            </DateInput>
                        </telerik:RadDateTimePicker>
                        <asp:RequiredFieldValidator ID="reqEndDate" runat="server" ControlToValidate="rdpEndDate"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select End Date/Time"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="cvTimes" runat="server" ControlToCompare="rdpStartDate"
                            ControlToValidate="rdpEndDate" CssClass="Validator" Display="Dynamic" ErrorMessage="End Date/Time cannot be earlier than Start Date/Time"
                            ForeColor="" Operator="GreaterThan"></asp:CompareValidator>
                    </td>
                </tr>
                <tr id="Tr7" runat="server">
                    <td align="center" id="tdTimeZone" runat="server" visible="false">
                        <asp:Label ID="Label12" runat="server" CssClass="FormLabel" Text="Time Zone*"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlTimeZone" runat="server" NoWrap="True">
                        </telerik:RadComboBox>
                          
                        <asp:RequiredFieldValidator ID="reqTimeZone" runat="server" ControlToValidate="ddlTimeZone"
                            CssClass="Validator" Display="Dynamic" Enabled="False" ErrorMessage="Please Select Time Zone"
                            ForeColor="" InitialValue="--Select Time Zone--" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                    <td align="center" id="Td18" runat="server">
                          
                    </td>
                </tr>
                <tr runat="server">
                    <td align="center" id="tdMaxCapacity" runat="server">
                        <asp:Label ID="Label13" runat="server" CssClass="FormLabel" Text="Maximum Capacity*"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtMaxCapacity" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqMaxCapacity" runat="server" ControlToValidate="txtMaxCapacity"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Enter Maximum Capacity"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                    <td id="tdMinCapacity" align="center" runat="server">
                        <asp:Label ID="Label14" runat="server" CssClass="FormLabel" Text="Minimum Capacity"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtMinCapacity" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr id="Tr2" runat="server">
                    <td id="Td3" align="center" runat="server">
                        <asp:Label ID="Label15" runat="server" CssClass="FormLabel" Text="Language*"></asp:Label>
                        <br />
                        <telerik:RadListBox ID="lbLanguage" runat="server" SelectionMode="Multiple">
                        </telerik:RadListBox>
                        <asp:RequiredFieldValidator ID="reqLanguage" runat="server" ControlToValidate="lbLanguage"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Language"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                          
                    </td>
                    <td align="center" runat="server" id="tdInstructor">
                        <asp:Label ID="Label16" runat="server" CssClass="FormLabel" Text="Instructor*"></asp:Label>
                        <br />
                        <telerik:RadListBox ID="lbAllInstructor" runat="server" AllowTransfer="True" TransferToID="lbInstructor"
                            Height="200px" Width="200px" AllowTransferOnDoubleClick="True" SelectionMode="Multiple">
                            <ButtonSettings TransferButtons="All" />
                        </telerik:RadListBox>
                        <telerik:RadListBox ID="lbInstructor" runat="server" AllowTransfer="True" TransferToID="lbAllInstructor"
                            Height="200px" Width="200px" AllowTransferOnDoubleClick="True" OnClientTransferred="itemTransferred"
                            SelectionMode="Multiple">
                            <ButtonSettings TransferButtons="All" />
                        </telerik:RadListBox>
                        <br />
                        <asp:RequiredFieldValidator ID="reqInstructor" runat="server" ControlToValidate="lbInstructor"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Instructor"
                            ForeColor="" SetFocusOnError="True"></asp:RequiredFieldValidator>
                          
                    </td>
                </tr>
                <tr runat="server">
                    <td id="tdRegion" align="center" runat="server">
                        <asp:Label ID="Label17" runat="server" CssClass="FormLabel" Text="Region*"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlRegion" runat="server" AutoPostBack="True" CausesValidation="False">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="reqRegion" runat="server" ControlToValidate="ddlRegion"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Region" ForeColor=""
                            InitialValue="--Select Region--" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                    <td align="center" runat="server">
                        <asp:Label ID="Label18" runat="server" CssClass="FormLabel" Text="Class Status*"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlStatus" runat="server" CausesValidation="False">
                        </telerik:RadComboBox>
                          
                        <asp:RequiredFieldValidator ID="reqClassStatus" runat="server" ControlToValidate="ddlStatus"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Class Status"
                            ForeColor="" InitialValue="--Select Class Status--" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="Tr11" runat="server">
                    <td id="tdMetroArea" align="center" runat="server">
                        <asp:Label ID="Label19" runat="server" CssClass="FormLabel" Text="Metro Area*"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlMetroArea" runat="server" AutoPostBack="True" CausesValidation="False">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="reqMetroArea" runat="server" ControlToValidate="ddlMetroArea"
                            CssClass="Validator" Display="Dynamic" ErrorMessage="Please Select Metro Area"
                            ForeColor="" InitialValue="--Select Metro Area--" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </td>
                    <td align="center" runat="server" id="tdOpenForReg">
                        <asp:Label ID="Label20" runat="server" CssClass="FormLabel" Text="Open For Registration"></asp:Label>
                        <br />
                        <asp:CheckBox ID="cbOpenForReg" runat="server" Checked="True" />
                    </td>
                </tr>
                <tr id="Tr12" runat="server">
                    <td id="tdLocation" align="center" runat="server">
                        <asp:Label ID="Label21" runat="server" CssClass="FormLabel" Text="Location"></asp:Label>
                        <br />
                        <telerik:RadComboBox ID="ddlLocation" runat="server" AutoPostBack="True" CausesValidation="False">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="reqLocation" runat="server" ControlToValidate="ddlLocation"
                            CssClass="Validator" Display="Dynamic" Enabled="False" ErrorMessage="Please Select Location"
                            ForeColor="" InitialValue="--Select Location--" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <div id="divRoom" runat="server" visible="false">
                            <asp:Label ID="Label27" runat="server" Text="Room" CssClass="FormLabel"></asp:Label><br />
                            <telerik:RadComboBox ID="ddlRoom" runat="server">
                            </telerik:RadComboBox>
                        </div>
                    </td>
                    <td align="center" runat="server" id="tdNotification">
                        <asp:Label ID="Label22" runat="server" CssClass="FormLabel" Text="Automated Reminder Notification"></asp:Label>
                        <br />
                        <asp:CheckBox ID="cbNotification" runat="server" Checked="True" />
                    </td>
                </tr>
                <tr runat="server">
                    <td align="center" id="tdChangeRegion" runat="server" visible="false">
                        <asp:Label ID="Label23" runat="server" CssClass="FormLabel" Text="Change Region/Metro Area"></asp:Label>
                        <br />
                        <asp:CheckBox ID="cbChangeRegion" runat="server" AutoPostBack="True" />
                    </td>
                    <td align="center" id="Td26" runat="server">
                          
                    </td>
                </tr>
                <tr runat="server">
                    <td colspan="2" align="center" id="Td28" runat="server">
                        <asp:Label ID="Label24" runat="server" CssClass="FormLabel" Text="Contact"></asp:Label>
                        <br />
                        <telerik:RadEditor ID="reContact" runat="server" ContentAreaCssFile="~/Styles/RadEditor.css"
                            EditModes="Design" Enabled="true" Width="629px" Height="260" ToolbarMode="ShowOnFocus"
                            EnableResize="false" ToolsWidth="601px">
                            <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorTool Name="Cut" />
                                    <telerik:EditorTool Name="Copy" />
                                    <telerik:EditorTool Name="Paste" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="FontName" />
                                    <telerik:EditorTool Name="FontSize" />
                                    <telerik:EditorTool Name="ForeColor" />
                                    <telerik:EditorTool Name="BackColor" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="Bold" />
                                    <telerik:EditorTool Name="Italic" />
                                    <telerik:EditorTool Name="Underline" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="JustifyLeft" />
                                    <telerik:EditorTool Name="JustifyCenter" />
                                    <telerik:EditorTool Name="JustifyRight" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertOrderedList" />
                                    <telerik:EditorTool Name="InsertUnorderedList" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertLink" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="TableWizard" />
                                </telerik:EditorToolGroup>
                            </Tools>
                            <Content> </Content>
                        </telerik:RadEditor>
                    </td>
                </tr>
                <tr id="Tr8" runat="server">
                    <td colspan="2" align="center" id="Td32" runat="server">
                        <asp:Label ID="Label25" runat="server" CssClass="FormLabel" Text="Class Notes"></asp:Label>
                        <br />
                        <telerik:RadEditor ID="reClassNotes" runat="server" ContentAreaCssFile="~/Styles/RadEditor.css"
                            EditModes="Design" Enabled="true" Width="629px" Height="260" ToolbarMode="ShowOnFocus"
                            EnableResize="false" ToolsWidth="601px">
                            <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorTool Name="Cut" />
                                    <telerik:EditorTool Name="Copy" />
                                    <telerik:EditorTool Name="Paste" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="FontName" />
                                    <telerik:EditorTool Name="FontSize" />
                                    <telerik:EditorTool Name="ForeColor" />
                                    <telerik:EditorTool Name="BackColor" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="Bold" />
                                    <telerik:EditorTool Name="Italic" />
                                    <telerik:EditorTool Name="Underline" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="JustifyLeft" />
                                    <telerik:EditorTool Name="JustifyCenter" />
                                    <telerik:EditorTool Name="JustifyRight" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertOrderedList" />
                                    <telerik:EditorTool Name="InsertUnorderedList" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertLink" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="TableWizard" />
                                </telerik:EditorToolGroup>
                            </Tools>
                            <Content> </Content>
                        </telerik:RadEditor>
                    </td>
                </tr>
                <tr id="Tr9" runat="server">
                    <td colspan="2" align="center" id="Td36" runat="server">
                        <asp:Label ID="Label26" runat="server" CssClass="FormLabel" Text="Instructor Notes"></asp:Label>
                        <br />
                        <telerik:RadEditor ID="reInstructorNotes" runat="server" ContentAreaCssFile="~/Styles/RadEditor.css"
                            EditModes="Design" Enabled="true" Width="629px" Height="260" ToolbarMode="ShowOnFocus"
                            EnableResize="false" ToolsWidth="601px">
                            <Tools>
                                <telerik:EditorToolGroup>
                                    <telerik:EditorTool Name="Cut" />
                                    <telerik:EditorTool Name="Copy" />
                                    <telerik:EditorTool Name="Paste" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="FontName" />
                                    <telerik:EditorTool Name="FontSize" />
                                    <telerik:EditorTool Name="ForeColor" />
                                    <telerik:EditorTool Name="BackColor" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="Bold" />
                                    <telerik:EditorTool Name="Italic" />
                                    <telerik:EditorTool Name="Underline" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="JustifyLeft" />
                                    <telerik:EditorTool Name="JustifyCenter" />
                                    <telerik:EditorTool Name="JustifyRight" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertOrderedList" />
                                    <telerik:EditorTool Name="InsertUnorderedList" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="InsertLink" />
                                    <telerik:EditorSeparator />
                                    <telerik:EditorTool Name="TableWizard" />
                                </telerik:EditorToolGroup>
                            </Tools>
                            <Content> </Content>
                        </telerik:RadEditor>
                    </td>
                </tr>
                <tr id="Tr10" runat="server">
                    <td align="right" id="Td40" runat="server">
                        <asp:Button ID="btnSave" runat="server" Text="Save" />
                    </td>
                    <td align="left" id="Td21" runat="server">
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="False" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>

    It is the lbCreateClass LinkButton that hides panel one and shows panel two.  Any suggestions would be most appreciated.  Thanks!!
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 11 Jan 2011 Link to this post

    Hi Dave,

    The problem your are experiencing is due to the fact that the CSS of the listboxes are not loaded the second time you open this panel.  This should be related to some AJAX request that you make , but in the following code provided you haven't send the implementation of this request and also the full post-back request that you make with the button in the second panel.
    Please send us an example project where you have isolated these two panels and the implementation of the AJAX request.

    Regards,
    Dimitar Terziev
    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.
  6. Dave
    Dave avatar
    9 posts
    Member since:
    Jan 2011

    Posted 20 Jan 2011 Link to this post

    Dimitar,

    I was able to re-create this issue with a very simple project.  Please see below:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Sample.aspx.vb" Inherits="Sample" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <telerik:RadScriptBlock runat="server">
     
            <script type="text/javascript">
                function conditionalPostback(sender, args) {
                    if (args.get_eventTarget() == "<%= Button1.UniqueID %>") {
                        args.set_enableAjax(false);
                    }
                }
            </script>
     
        </telerik:RadScriptBlock>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
            ClientEvents-OnRequestStart="conditionalPostback">
            <ClientEvents OnRequestStart="conditionalPostback" />
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Button2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ContainerPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Button1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ContainerPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
            Skin="Default" IsSticky="True">
        </telerik:RadAjaxLoadingPanel>
        <div>
            <asp:Panel ID="ContainerPanel" runat="server">
                <asp:Panel ID="Panel1" runat="server">
                    <asp:Button ID="Button2" runat="server" Text="Open Panel 2" />
                </asp:Panel>
                <asp:Panel ID="Panel2" runat="server" Visible="false">
                    <table>
                        <tr>
                            <td>
                                <telerik:RadListBox ID="RadListBox1" runat="server" AllowTransfer="True" AllowTransferOnDoubleClick="True"
                                    SelectionMode="Multiple" TransferToID="RadListBox2">
                                    <ButtonSettings TransferButtons="All" />
                                    <Items>
                                        <telerik:RadListBoxItem runat="server" Text="Apple" />
                                        <telerik:RadListBoxItem runat="server" Text="Orange" />
                                        <telerik:RadListBoxItem runat="server" Text="Banana" />
                                        <telerik:RadListBoxItem runat="server" Text="Watermelon" />
                                    </Items>
                                </telerik:RadListBox>
                                <telerik:RadListBox ID="RadListBox2" runat="server" AllowTransfer="True" AllowTransferOnDoubleClick="True"
                                    TransferToID="RadListBox1">
                                    <ButtonSettings TransferButtons="All" />
                                </telerik:RadListBox>
                            </td>
                            <td>
                                  
                                <asp:Button ID="Button1" runat="server" Text="Open Panel 1" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <telerik:RadComboBox ID="RadComboBox1" runat="server">
                                    <Items>
                                        <telerik:RadComboBoxItem runat="server" Text="Apple" Value="RadComboBoxItem1" />
                                        <telerik:RadComboBoxItem runat="server" Text="Orange" Value="RadComboBoxItem2" />
                                        <telerik:RadComboBoxItem runat="server" Text="Banana" Value="RadComboBoxItem3" />
                                        <telerik:RadComboBoxItem runat="server" Text="Watermelon" Value="RadComboBoxItem4" />
                                    </Items>
                                </telerik:RadComboBox>
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </asp:Panel>
        </div>
        </form>
    </body>
    </html>

    Code Behind:
    Partial Class Sample
        Inherits System.Web.UI.Page
     
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     
        End Sub
     
        Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
            Panel1.Visible = False
            Panel2.Visible = True
        End Sub
     
        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            Panel1.Visible = True
            Panel2.Visible = False
        End Sub
    End Class
  7. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 21 Jan 2011 Link to this post

    Hello Dave,

    Thank you for contacting us.

    The problem you experience is due to the fact that you stop the AJAX post-pack whenever the Button1 is clicked. That why the ListBox couldn't load its styles and it's rendered like a regular menu. In order to make a panel visible again you should go through a postback in order all controls in it to load properly.
    Change the implementation of  conditionalPostback like show below:

    function conditionalPostback(sender, args) {
        if (args.get_eventTarget() == "<%= Button1.UniqueID %>") {
            args.set_enableAjax(true);
        }
    }
    and you will see that the listbox is rendered properly.


    Best wishes,
    Dimitar Terziev
    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.
  8. Dave
    Dave avatar
    9 posts
    Member since:
    Jan 2011

    Posted 21 Jan 2011 Link to this post

    Dimitar,

    Thanks for the reply.  I disable the AJAX postback for a reason.  When I click Button1, I want a full page postback.  Shouldn't the controls load either way?
  9. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 25 Jan 2011 Link to this post

    Hi Dave,

    You should add RadStyleSheetManager to the page in order to load the CSS classes properly in the scenario that you are trying to implement. Also you should change the AJAX settings as show below:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <ClientEvents OnRequestStart="requestStart" />
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Button2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ContainerPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Button1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ContainerPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

    You should subscribe only once to the requestStart event , not twice as it is in your scenario.

    The javascript function is as following:
    function requestStart(sender, args) {
        if (args.get_eventTarget() == "Button1") {
            args.set_enableAjax(false);
        }
    }


    Regards,
    Dimitar Terziev
    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
UI for ASP.NET Ajax is Ready for VS 2017