Hello I'm trying to open a radwindow from the server side on the event on some a linked button on a radgrid clicked it makes an ajax call using the ajax manager
the problem is the $find() function always returns null
I tried every possible solution I found online and the javascript function is at the end of the page
<
telerik:RadCodeBlock
ID
=
"CodeCodeCode"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function OpenWindow(url)
{
var rwindow = $find("<%= rw_customerfeedback.ClientID %>");
rwindow.setUrl(url);
rwindow.show(url);
rwindow.center();
}
</
script
>
</
telerik:RadCodeBlock
>
here's how I make the ajax call
<
telerik:AjaxSetting
AjaxControlID
=
"lnkbtn_complaint"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rw_customerfeedback"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
and here's how I call the java script code
string
corporateIdentifier = RouteData.Values[
"CorporateIdentitfier"
].ToString();
string
url = Page.GetRouteUrl(
"Complaints"
,
new
RouteValueDictionary{{
"CorporateIdentifier"
, corporateIdentifier }});
string
script = @
"OpenWindow('"
+ url +
"');"
;
Session[
"TicketID"
] = e.CommandArgument;
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"OpenWindow"
, script,
true
);