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

Migration from jquery version 1.2.6 to 1.7.1

1 Answer 73 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dhaval
Top achievements
Rank 2
Dhaval asked on 29 Feb 2012, 03:18 PM
Hi There,

In the Telerik version 2011.2.915.40 i found jquery version 1.6.4 and in my application i have used 1.7.1.

I cannot find the ID of the grid using $find('<%= grid.ClientID %>') it is returning null to me. It was working until i was using Jquery version 1.2.6.

NOTE: My grid is in ascx page and javascript is also in ascx page.

Waiting for your response.

Thanks.

Regards,
Dhaval

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 02 Mar 2012, 03:54 PM
Dhaval:

This code works fine for me usingthe same Telerik version 2011.2.915.40:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        <!--
        function RowSelected(sender, eventArgs) {
 
            var grid = $find("<%=RadGrid1.ClientID %>");
            linkButton1 = $telerik.findControl(grid.get_element(), "lb_Button1");
            linkButton1.set_visible(false);
            linkButton2 = $telerik.findControl(grid.get_element(), "lb_Button2");
            linkButton2.set_visible(false);
            var text = "";
            text += "Row with index: " + eventArgs.get_itemIndexHierarchical() + " was selected";
            document.getElementById("OutPut").innerHTML = text;
        }
 
        -->
    </script>
</telerik:RadCodeBlock>

I would suggest that you wrap your JavaScript in a RadCodeBlock, if you've not already done so, and try again.

Information on Telerik use of jQuery is available on the Using jQuery documentation page.

Hope this helps!

Hope this helps!
Tags
Ajax
Asked by
Dhaval
Top achievements
Rank 2
Answers by
Richard
Top achievements
Rank 1
Share this question
or