or
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
Behaviors
=
"Close"
runat
=
"server"
><
BR
>
<
Windows
><
BR
>
<
telerik:RadWindow
ID
=
"radWinAddCredit"
OpenerElementID
=
"btnAddCreditForTalent"
runat
=
"server"
<BR>
Modal="true" AutoSize="true" Title="Add/Edit Credit"
VisibleStatusbar="false"<
BR
>
VisibleOnPageLoad="False" Skin="WebBlue" Height="300px"
ShowContentDuringLoad="False"<
BR
>
Width="375px"
Behaviors="Close"><
BR
>
<
ContentTemplate
><
BR
>
<
table
class
=
"form"
width
=
"100%"
><
BR
>
<
tr
><
BR
>
<
td
class
=
"formLabel-RightAlign"
align
=
"left"
><
BR
>
Craft<
BR
>
</
td
><
BR
>
<
td
><
BR
>
<
telerik:RadComboBox
ID
=
"cboCrafts"
Skin
=
"WebBlue"
Width
=
"205px"
ZIndex
=
"5000"
MarkFirstMatch
=
"true"
<BR>
EmptyMessage="Type to Select..."
runat="server"><
BR
>
</
telerik:RadComboBox
><
BR
>
<
asp:RequiredFieldValidator
ID
=
"valCreditCrafts"
ControlToValidate
=
"cboCrafts"
runat
=
"server"
<BR>
ErrorMessage="Required" InitialValue="Type to Select..."
ValidationGroup="CreditGroup"></
asp:RequiredFieldValidator
><
BR
>
</
td
><
BR
>
</
tr
><
BR
>
<
tr
><
BR
>
<
td
class
=
"formLabel-RightAlign"
><
BR
>
Title<
BR
>
</
td
><
BR
>
<
td
><
BR
>
<
telerik:RadComboBox
ID
=
"cboShowTitles"
Skin
=
"WebBlue"
ZIndex
=
"5000"
Width
=
"205px"
<BR>
EnableAutomaticLoadOnDemand="true" EmptyMessage="Type to Search..."
MarkFirstMatch="true"<
BR
>
runat="server" EnableLoadOnDemand="True"
ItemsPerRequest="100"><
BR
>
<
WebServiceSettings
Method
=
"GetShowTitles"
Path
=
"../Admin/Controls/AdminService.asmx"
/><
BR
>
</
telerik:RadComboBox
><
BR
>
<
asp:RequiredFieldValidator
ID
=
"valCreditShows"
ControlToValidate
=
"cboShowTitles"
<BR>
runat="server" ErrorMessage="Required" InitialValue="Type to Search..."
ValidationGroup="CreditGroup"></
asp:RequiredFieldValidator
><
BR
>
</
td
><
BR
>
</
tr
><
BR
>
<
tr
><
BR
>
<
td
class
=
"formLabel-RightAlign"
><
BR
>
Comment<
BR
>
</
td
><
BR
>
<
td
><
BR
>
<
asp:TextBox
ID
=
"txtCreditComment"
CssClass
=
"textFields"
runat
=
"server"
Width
=
"200px"
></
asp:TextBox
><
BR
>
</
td
><
BR
>
</
tr
><
BR
>
<
tr
><
BR
>
<
td
align
=
"right"
colspan
=
"2"
><
BR
>
<
telerik:RadButton
ID
=
"btnSaveCredit"
Skin
=
"WebBlue"
runat
=
"server"
Text
=
"Save"
ValidationGroup
=
"CreditGroup"
<BR>
OnClick="btnSaveCredit_Click"><
BR
>
</
telerik:RadButton
><
BR
>
</
td
><
BR
>
</
tr
><
BR
>
</
table
><
BR
>
</
ContentTemplate
><
BR
>
</
telerik:RadWindow
><
BR
>
</
Windows
><
BR
>
</
telerik:RadWindowManager
>
Partial code behind for btnSave_Click method...
<P>
if
(isUpdate)<BR> {<BR>
talentCredit.UpdateTalentCredit(credit);<BR> }<BR>
else
<BR> {<BR> <BR>
talentCredit.CreateTalentCredit(credit);</P>
<P> }<BR> SiteMaster masterPage =
(SiteMaster)Page.Master;<BR> masterPage.SetAlertMessage("Credit has been
Saved.
", "
green");</P>
<P> loadCredits(talentId);<BR> radgridCredits.DataBind();</P>
<P> <BR> RadWindow rw =
RadWindowManager1.Windows[0];<BR>{<BR>
rw.Visible=
false
;<BR>}<BR></P>
NOTE: This code is in a Try/Catch and DOES NOT error out there. It just errors out in VS2010 with the Javascript Error listed above after RadWindow.Visible=false gets called.
function
GetRadWindow()
{
var
oWindow =
null
;
if
(window.radWindow) oWindow = window.radWindow;
//Will work in Moz in all cases, including clasic dialog
else
if
(window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
//IE (and Moz az well)
return
oWindow;
}