This is a migrated thread and some comments may be shown as answers.

CSS Lost on close radwindow via post

2 Answers 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 21 Jul 2014, 02:47 PM
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%>");
RadWindow.show();
}


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" >
        <ContentTemplate>
            <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;">
                    </telerik:RadBinaryImage>
                    <asp:Label Font-Bold="true" ID="lbl_confirmar" Text="Confirma esborrat de línia de conciliació" runat="server" />
                </div>
                <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" />
            </div>
        </ContentTemplate>
</telerik:radwindow>


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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Jul 2014, 03:44 AM
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.

Thanks,
Shinu.
0
Daniel
Top achievements
Rank 1
answered on 14 Nov 2014, 10:10 AM
Thanks @Shinu about your help.

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


Tags
General Discussions
Asked by
Daniel
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Share this question
or