CSS Lost on close radwindow via post

3 posts, 0 answers
  1. Daniel
    Daniel avatar
    16 posts
    Member since:
    Jun 2013

    Posted 21 Jul 2014 Link to this post

    I have a single radwindow. It is all time not visible and I open it for delete confirm via javascript:

    function OpenDialog(button) {
    var RadWindow = $find("<%=RadWindowConfirmDelete.ClientID%>");

    Issue is: If I close radwindow via javascript all runs fine, but, if I close window via 'post' CSS is lost.

    <telerik:radwindow runat="server" id="RadWindowConfirmDelete" Behaviors="None"
            Skin="Web20" EnableViewState="False" VisibleOnPageLoad="false" >
                <div style="float: left; margin: 10px 0px 0px 30px;" >
                    <div >
                        <telerik:RadBinaryImage ID="RadBinaryImageDelete24" runat="server" ImageUrl="~/Images/delete24.png" Height="24px" style="vertical-align:bottom;">
                        <asp:Label Font-Bold="true" ID="lbl_confirmar" Text="Confirma esborrat de línia de conciliació" runat="server" />
                    <br />
                    <asp:Label Font-Italic="true" Id="lbl_confirm_item_text" Text="" runat="server" />
                    <br />
                    <telerik:RadButton ID="rbConfirm_OK" Text="Delete" runat="server" Skin="Web20"  OnClick="rbConfirm_OK_Click"  />
                    <asp:Label runat="server" ID="sep_butons_confirm_delete" Text ="" Width ="20px"></asp:Label>
                    <telerik:RadButton ID="rbConfirm_Cancel" Text="Cancel" runat="server" Skin="Web20"  OnClientClicked="CloseDialog" AutoPostBack="false" />

    Also CSS is lost when I postback on close:

    <telerik:RadButton ID="rbConfirm_Cancel" Text="Cancel" runat="server" Skin="Web20"  OnClientClicked="CloseDialog" AutoPostBack="true" />

    What is wrong?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Jul 2014 in reply to Daniel Link to this post

    Hi Daniel,

    The provided code is working fine at my end. From your code I have noticed you are setting AutoPostBack to true and OnClientClicked event you are trying to hide the RadWindow, but if you are setting AutoPostBack no need of explicitly closing the RadWindow. Because RadWindow is opened using Client side code, this will not persist after postback. In order to achieve your scenario either you can set AutoPostBack tto true or from client side you can close the RadWindow and set AutoPostBack to false. The best approach is to close RadWindoe from client side. Can you please elaborate which control CSS is losing after postback.

  3. Daniel
    Daniel avatar
    16 posts
    Member since:
    Jun 2013

    Posted 14 Nov 2014 Link to this post

    Thanks @Shinu about your help.

    Finally issue was with IE and hight of css files. Issue solved merging files with telerik:RadStyleSheetManager parameter EnableStyleSheetCombine.

Back to Top