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

$fin() always returns null with radwindow

3 Answers 112 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kareem
Top achievements
Rank 1
Kareem asked on 03 Nov 2015, 08:41 AM

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);

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 03 Nov 2015, 09:31 AM

Hello,

I advise that you review the following articles:

Regards,

Marin Bratanov
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Kareem
Top achievements
Rank 1
answered on 03 Nov 2015, 02:17 PM

Dear Marin Bratanov,

you have to understand that I've already tried all the solution mentioned in those articles

more over I have no problem launching the script from the server the script launches just fine

the problem is that the $find always returns null when I try to search for the radwindow

there's something I forgot to mention I set all the controls client IDs to static, is that might be causing the problem??

0
Marin Bratanov
Telerik team
answered on 03 Nov 2015, 02:31 PM

Hello,

ClientIDMode = Static is not supported by our controls and you should remove this property: http://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/general-troubleshooting#setting-clientidmode-property-to-static-breaks-the-telerik-controls-functionality.

Regards,

Marin Bratanov
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
Kareem
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Kareem
Top achievements
Rank 1
Share this question
or