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. Image for the cookie policy date

Background and closing

When I open dialog i'm using created web page for it.
1) How to make backgorund of primary page disabled? It doesn't have to be black just that client cannot click over page until dialog is closed.
2) How to close that dialog with button on web page?


1 Reply

NP Narayanasamy Panneer Selvam Syncfusion Team July 13, 2016 11:09 AM UTC

Hi Hrvoje Voda,   
   
Thanks for Contacting Syncfusion support.   
    
We have analyzed your queries and prepared a sample as per your requirement.   
  
Query 1:   
How to make backgorund of primary page disabled? It doesn't have to be black just that client cannot click over page until dialog is closed.   
We can achieve your requirement by using our existing modal dialog property to be set as EnableModal=”true”. To avoid the blackbackground you need to override the default CSS. Please refer the code example.   
   
Query 2: How to close that dialog with button on web page?   
As from your first query we cannot access anything behind the dialog. So we cannot use the close button in the webpage you have. Instead you can use close button in the dialog panel.   
Code example:   
CSS overriding:   
<style type="text/css">   
#MainContent_basicDialog_overLay.e-overlay {   
   background-color: initial;   
}   
</style>   
   
ASPX:   
<ej:Dialog ID="basicDialog" Title="Login Form" ClientSideOnClose="onDialogClose" EnableModal="true" EnableResize="false" runat="server" >   
<%--place your contents here.--%>   
</ej:Dialog>   
   
   
Regards,
Narayanasamy P.
  


Loader.
Up arrow icon