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

$find fails to find grid on IIS

1 Answer 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy Barker
Top achievements
Rank 1
Andy Barker asked on 30 Sep 2008, 05:02 PM
I have some code that works fine on my local box but when I deploy to IIS it fails.

this code is in the page.
            <script type="text/javascript" language="javascript" >
                var _MainGridID = "<%= MainGrid.ClientID %>"
            </script>

----
                    <telerik:RadGrid ID="MainGrid" OnItemDataBound="MainGrid_ItemDataBound" DataSourceID="MyObjectDataSource"
                        AllowFilteringByColumn="False" AllowSorting="True" AllowPaging="True" PageSize="200"
                        Skin="Office2007" runat="server" GridLines="None" Width="100%" Height="245px"
                        EnableViewState="True"  AllowMultiRowSelection="True"
                        OnNeedDataSource="MainGrid_NeedDataSource" AutoGenerateColumns="False" OnDataBound="MainGrid_DataBound">


.......
this code is in a script file...

tableViewM = $find(_MainGridID).get_masterTableView();

The $find is returning null...

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Oct 2008, 04:35 AM
Hello Andy,

Can you try replacing your code with the code snippet shown below and see if it works.
js:
 var TableView = $find('<%= MainGrid.ClientID %>').MasterTableView;  
 

Thanks
Princy.
Tags
Grid
Asked by
Andy Barker
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or