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

How to get the frame of radwindo in c# to make the transparency true

1 Answer 73 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sai Prashad Patro
Top achievements
Rank 1
Sai Prashad Patro asked on 22 Sep 2008, 08:41 AM
Hi,

    i have a radwindow with custom skin. the javascript written to open is:

function

GetRadWindow()

{

return window.radWindow || window.frameElement.radWindow;

}

function

OpenPopup(windowid)

{

var oWnd=$find(windowid);

oWnd.show();

var frame = oWnd.get_contentFrame();

frame.setAttribute(

"allowTransparency","true");

}

 Here i am able to get the frame and to allow the transparency.
I want to change this in c#
for a condition i have to open the rad window dynamically so in page load i have written like this :

if

(condition here)

{

window1.VisibleOnPageLoad =

true;

}
But i want to get the frame and change its transparency.

so how can i get the frame to change its transparency in c#

Thanks
Sai

1 Answer, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 22 Sep 2008, 02:55 PM

You can use ScriptManager.RegisterStartupScript  to execute the script which will allows transparency , e.g.

if (condition here)   
        {  
            window1.VisibleOnPageLoad = true;   
            ScriptManager.RegisterStartupScript(  
                this.Page,  
                this.GetType(),  
                "AddTransperency",  
                string.Format(@"function _addTransperency() {{  
    Sys.Application.remove_load(_addTransperency);  
    var oWnd=$find('{0}');  
    var frame = oWnd.get_contentFrame();  
    frame.setAttribute('allowTransparency','true');   
}};  
Sys.Application.add_load(_addTransperency);", RadWindow1.ClientID),  
                true);  
        } 
Tags
Window
Asked by
Sai Prashad Patro
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or