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.

Dialog Flicker

Thread ID:

Created:

Updated:

Platform:

Replies:

127554 Nov 22,2016 04:21 PM Nov 24,2016 01:16 AM ASP.NET Web Forms 3
loading
Tags: Dialog
Donald
Asked On November 22, 2016 04:21 PM

Hi, 

I am hoping you can help me with this issue.  

I currently have a dialog on my web form that is opened from a JavaScript button click (I'm rather new to JS, so please excuse my stupidity).  The dialog has 'ShowOnInit="false" but what i am experiencing is that you can see the details of the dialog for a second or two when the page loads.  

The dialog does not have this problem when i set visibility=false but then i can't open it with my JS click. 

my water downed code is below:

<script type="text/javascript">
        function NewCase() {
            dialogObj = $("#<%=DiaNewCase.ClientID%>").data("ejDialog");
            dialogObj.open();
        };
</script>

<ej:Dialog ID="DiaNewCase" Content="#form1" ShowOnInit="false" EnableResize="false" Title="Cases - New Item" runat="server">
        <DialogContent></DialogContent>
</ej:Dialog>




Selvamani Sankarappan [Syncfusion]
Replied On November 23, 2016 07:22 AM

Hi Donald,   
  
Thanks for using Syncfusion products.   
  
Query 1: The dialog has 'ShowOnInit="false" but what i am experiencing is that you can see the details of the dialog for a second or two when the page loads.      
We could re-produce this issue (The Dialog content just flickers at page loading if showOnInit as false) at our side. To overcome this issue, we suggest to set the visibility as hidden to Dialog’s the parent element and make it visible when we open the Dialog. Please refer to the following code example:   
[aspx]   
<div id="hidden" style="visibility:hidden">   
    <ej:Dialog ID="basicDialog" Width="550" Height="400" ShowHeader="true"        Content="#form1"  ClientSideOnClose="onDialogClose" runat="server" Title="Audi Q3   Drive" EnableRTL="false" ShowOnInit="false">   
              <DialogContent>   
            </DialogContent>   
    </ej:Dialog>   
</div>  
   
function onOpen() {   
        $("#hidden").css("visibility""visible");   
        var dialogObj = $("#MainContent_basicDialog").data("ejDialog");   
        dialogObj.open();   
        $("#btnOpen").hide();   
    }   
   
Query 2: The dialog does not have this problem when i set visibility=false but then i can't open it with my JS click.    
This is not an issue but the behavior in ASP. If we set the visible as false on initial rendering of the any control, corresponding control elements will not be created. So, when we set false the Dialog control visibility on initial rendering, the wrapper elements are not created. That’s why, you were unable to open the Dialog on button click action, since the element is not available in DOM.   
Refer to the following sample:   
If we have misunderstood your requirement, please clarify us with further details on the issue you are facing with Dialog using video demo or screenshots.   
   
Regards,   
Selvamani S.  


Donald
Replied On November 23, 2016 12:16 PM

Selvamani S.

Thank you for your help.  I can not believe how simple that solution was or that i did not originally try doing that.

It works great and at this time i am having no more issues!

Thanks again,
Donnie

  

Selvamani Sankarappan [Syncfusion]
Replied On November 24, 2016 01:16 AM

Hi Donald, 
Thanks for the feedback, 
We are happy that the problem has been resolved at your end.  ​​​ 
Let us know if you need any further assistance. 
Regards,  
Selvamani S. 


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.

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.

;