We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

fitToPage

Thread ID:

Created:

Updated:

Platform:

Replies:

127261 Nov 7,2016 10:47 AM UTC Nov 8,2016 04:22 AM UTC ASP.NET Web Forms 2
loading
Tags: Diagram
Martin Sickel
Asked On November 7, 2016 10:47 AM UTC

Dear All

I am triggering this function by a button
            <ej:Button ID="btnFitToPage" runat="server" Text="FitToPage" CssClass="button" ClientSideOnClick="fittopage" ShowRoundedCorner="true"></ej:Button>


<asp:Content ID="Scripts" ContentPlaceHolderID="ScriptSection" runat="server">
    <script type="text/javascript">
        function fittopage(e) {
            var diagram = $("#diagram").ejDiagram("instance");
                diagram.fitToPage("page", {
                    left: 5,
                    top: 5,
                    right: 5,
                    bottom: 5
                });
        }
    </script>
</asp:Content>

As I can see the resize is working as expected, but 3 seconds later the page is cleared. 
What did I do wrong?

Thanks for help
Martin

Martin Sickel
Replied On November 7, 2016 02:30 PM UTC

Dear All

found the issue by myself, I had to ad Type="Button" into the Button ant the Page, now it worked as expected.

Shyam G [Syncfusion]
Replied On November 8, 2016 04:22 AM UTC

Hi Martin, 
Please let me know if you need further assistance on this. 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;