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

TelerikModalOverlay

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lee Fine
Top achievements
Rank 1
Lee Fine asked on 09 Jun 2010, 12:39 PM
I have a question regarding this style class.  I know that I can override this in my page to control the background opacity for modal radWindows by putting this in my page:

 

<style type="text/css">

 

 

.TelerikModalOverlay

 

{

 

  filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=90) !important;

 

 

  opacity: .9 !important;

 

 

  -moz-opacity: .9 !important;

 

}

 

</style>

However, is there any way to modify the background shading differently for different radwindows?  I have a scenario on a single page where I want the normal lightly shaded gray background (opacity=50) for one radwindow but I want a complete covering of the parent window (opacity=100) for another.  The above override will set the opacity the same for both.

Thanks in advance.

 

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 10 Jun 2010, 05:42 PM
Hello Lee,

There is no such built in functionality in the RadWindow control.
You should create few different css classes(with different opacity) and use the workaround below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .TelerikModalOverlay1
        {
            filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=10) !important;
            opacity: .1 !important;
            -moz-opacity: .1 !important;
        }
         .TelerikModalOverlay2
        {
            filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=90) !important;
            opacity: .9 !important;
            -moz-opacity: .9 !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
        function open1()
        {
            oWin = radopen("http://www.google.com", "RadWindow1");
           //Set the class you want to use for the current window
           oWin._modalExtender._backgroundElement.className = "TelerikModalOverlay1";
       }
       function open2()
       {
           oWin = radopen("http://www.google.com", "RadWindow2");
           //Set the class you want to use for the current window
           oWin._modalExtender._backgroundElement.className = "TelerikModalOverlay2";
       }  
    </script>
    <div>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true">
        </telerik:RadWindowManager>
        <asp:LinkButton ID="LinkButton2" OnClientClick="open1(); return false;" runat="server">OpenWindow1</asp:LinkButton>
            <asp:LinkButton ID="LinkButton1" OnClientClick="open2(); return false;" runat="server">OpenWindow2</asp:LinkButton>
    </div>
    </form>
</body>
</html>

Hope this helps.

Greetings,
Petio Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Lee Fine
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or