
var
tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
This works great when the javascript is inline with my html markup. However, in trying to be organized, I put my javascript in an external .js file and am then referencing the .js file from the html. This way I don't have my html and javascript together but as seperate files.
This is fine and of course standard practice, but, when my script is in a .js file, a call like this doesn't work:
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
Is this just a limitation or does someone know the trick for me to have a page's javascript in a .js file but at the same time be able to reference a radcontrol on the page.

Web user control markup is this :
function Enquiry_Grid_RowDataBound(sender, args) {
var createCheckBox = "<input type='checkbox' id='chk_" + args.get_item()._itemIndexHierarchical + "'/>";
args.get_item()._element.cells[0].innerHTML = createCheckBox;
}
function Enquiry_Grid_RowDblClick(sender, args) {
try {var grid = sender;
var MasterTable = grid.get_masterTableView();
var rowIndex = args.get_itemIndexHierarchical();
var row = MasterTable.get_selectedItems()[0];
var crmTransactionId = MasterTable.getCellByColumnUniqueName(row, "int_crm_transaction_id").innerText;
}
<telerik:RadGrid ID="grdEnquires" BorderStyle="None" Height="150px" AllowMultiRowSelection="false"
runat="server" Skin="Office2007" Width="100%" AutoGenerateColumns="False" GridLines="None">
<%
--OnItemDataBound="grdEnquires_ItemDataBound">--%>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="True" />
<Selecting AllowRowSelect="True" />
<ClientEvents OnRowDataBound="Enquiry_Grid_RowDataBound" OnRowDblClick="Enquiry_Grid_RowDblClick" />
</ClientSettings>
<%
--<HeaderStyle CssClass="gridHeader" />--%>
<MasterTableView CommandItemDisplay="None" TableLayout="Fixed" EditMode="EditForms"
AutoGenerateColumns="False" DataKeyNames="int_crm_transaction_id" runat="server"
ClientDataKeyNames="int_crm_transaction_id" NoDetailRecordsText="" NoMasterRecordsText="">
<Columns>
<telerik:GridTemplateColumn HeaderText="" HeaderStyle-Width="30px">
<%
-- <HeaderTemplate>
<input type="checkbox" onclick="SelectAll();" id="chkSelectAll" /></HeaderTemplate>--
%>
<ItemTemplate>
<input type="checkbox" id="chkSelect" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="int_customer_id" HeaderText="Customer ID" SortExpression="int_customer_id"
UniqueName="int_customer_id" Display="false">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Code Behind is This:
public void BindInquiryRequest(DataRow[] dr)
{
grdEnquires.DataSource = dr;
grdEnquires.DataBind();
}
.ASPX page Markup is THIS:
<asp:ScriptManager ID="sm" runat="server" ScriptMode="Release" LoadScriptsBeforeUI="false">
<Services>
<asp:ServiceReference Path="~/Services/GetData.asmx" />
</Services>
</asp:ScriptManager>
<asp:UpdatePanel ID="up" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" Width="100%" CssClass="panelBar">
<asp:Label ID="Label1" runat="server" Text="Inquiry/Request"></asp:Label>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" CssClass="collapsePanel" BackColor="White"
Font-Size="8" ScrollBars="None" Width="100%">
<uc:InquiryRequestList ID="ucInquiryRequest" runat="server" Height="100" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
Code Behind is this :
DataRow[] dr = ((DataSet)wsGetData.GlobalSearch(searchIn, searchValue)).Tables[0].Select("int_crm_transaction_id not like 'CMP%'");
ucInquiryRequest.BindInquiryRequest(dr);
and except this one other problem is this : i have taken a input button not runat="server" and i export grid to excel it was doing postback, but i don't want post back.
button markup is this:
function Inquiry_ExportToExcel() {
var grid = $find("<%=grdEnquires.ClientID %>").get_masterTableView();
grid.exportToExcel();
return false;
}
<
input type="button" id="btnExport1" value="Export" style="width:50px;" causesvalidation="false" onclick="Inquiry_ExportToExcel();" />
Please solve my problem. I am awaiting of your kind response.

10. [Optional. Follow this step only if you intend to use skins different from the default or if you plan to modify the JavaScript files
Exceptions: Because of the specific control features, you will always need to copy RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell and Telerik RadWindow products. ]
Copy the new RadControls folder to the root of your web-application.
(Well ....There is no RadControls Folder in the HotFix zip ..only individual folders for scripts and Skins, within each of these folders are subfolders per RadControl)
and the structures are quite different.
eg. Original (ex 2008.2)
Has
and the zip..has an entirely different folder structure....
Are we supposed to then copy each one (script + skin individually) across to each matching folder (not all match either).
Or...Delete all that were in the RadControls folder of the app, and then copy across the Scripts and The Skins folders as is, from the unzipped HotFix folders??
Also,
Wish the Download page part of the telerik YourAccount , to Downloads, to some link at the bottom re inhouse builds (where you actually get the fix!!) site (Help on this is also outdated, bears no resemblance to Site structure, naming conventions anymore), could really warn the user there, that Downloading the New version Installer.exe, and doing the install WHEN the client already has an older version installed will lead to some serious GAC issues , so rather then use the the Zip. Can't they be Placed together so one does'nt have to go searching elsewhere for the ZIp or Hotfix downloadables...with some indication as to which to download / use and why...Like warning , do this and lose 10 years of your life, or do it this way, and save yourself pain.
It's not obvious until you have done the new install, run into all sorts of GAc issues, and read the documentation, and more, and hours later, having just deleted the whole bloody lot out of the gac, and not replaced any either, found out you actullay needed the zip and now have apps to fix and then decided to just live with the dll's in each App's bin folder. Upgrade the Web.Ui.Dll and each controls reference to it in the bin.
ps the help says copy the dll (singular) from the zips bin dir....there are 2 dll's and an xml file in that folder. so is it the Web.UI.DLL or the Web.Design dll ??? or both.??
Fustrated, pissed off and days behind on my dev schedule.
But the rest and controls....bar issues with Editor not working in Popup rad windows are still great...just wish I could get to use the new ones ..eg Grid Export to pdf,...New Editor dialogs etc.
please use the following "Developers" email addr when responding.
Thanks