Hi,
I have used RadAjaxLoadingPanel in my page as following.
------------------------------------------------------------------------------
I have used RadAjaxLoadingPanel in my page as following.
------------------------------------------------------------------------------
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <script type="text/javascript"> function requestStart(sender, args) { if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0) { args.set_enableAjax(false); } } function ValidateData() { return true; } </script> <table style="width: 100%;"> <tr> <td class="TDInfoLabel" style="width: 20%;"></td> <td class="TDInfoValue"> <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" OnClientClick="return ValidateData();" /> </td> </tr> </table> <br /> <div style="overflow: auto; height: 100%; font-size: 12px;"> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="requestStart"> <telerik:RadGrid ID="rgvUserData" runat="server" Skin="Hay" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" PageSize="50" AllowPaging="True" PagerStyle-Mode="NextPrevAndNumeric"> <ClientSettings AllowGroupExpandCollapse="true" EnableRowHoverStyle="true" Selecting-AllowRowSelect="true"> <Selecting AllowRowSelect="True"></Selecting> </ClientSettings> <MasterTableView CommandItemDisplay="Top" GroupLoadMode="Client" AllowMultiColumnSorting="false" GroupHeaderItemStyle-ForeColor="Black" PageSize="50" UseAllDataFields="False"> <CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToExcelButton="true" ShowAddNewRecordButton="false"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> <GroupHeaderItemStyle ForeColor="Black"></GroupHeaderItemStyle> </MasterTableView> <ExportSettings FileName="ExportedData" IgnorePaging="True" OpenInNewWindow="False"> <Excel Format="Html"></Excel> </ExportSettings> <HeaderStyle ForeColor="White" /> <FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> </telerik:RadAjaxPanel> </div> <br /> </asp:Content>
------------------------------------------------------------------------------
Now If I try to access any control in script section by following wayvar btn = document.getElementById("<%= btnSearch.ClientID%>");Or
var btn = $find("<%= btnSearch.ClientID%>");
then I am getting following errors when I try to run the page.
Crome: Error : The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
IE: 0x800a138f - JavaScript runtime error: Unable to get property 'notifyScriptLoaded' of undefined or null reference.
If I delete the lines accessing the controls from JavaScript section then it runs fine.
Regards,
John