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

Rad grid Give error on refresh button

1 Answer 130 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 21 Jul 2008, 07:43 AM
Here i am using RadControl Asp.net Ajax Q1 2008

I am using Radgrid and refresh button
On refresh is used radajaxmanager and radloading panel .

when i click on refersh button it gives error as

Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method

The code are follows.


 
            
<telerik:RadAjaxManager ID="rdAjaxManagerHistoryGrid" runat="server" EnableAJAX="true" DefaultLoadingPanelID="LoadingPnlCustom" >
                <ajaxsettings>
                    <telerik:AjaxSetting AjaxControlID="rGridHistories">
                        <updatedcontrols>
                            <telerik:AjaxUpdatedControl ControlID="rGridHistories"
                    LoadingPanelID="LoadingPnlCustom" /></updatedcontrols></telerik:AjaxSetting>
       <telerik:AjaxSetting AjaxControlID="btnRefreshHistory">
                        <updatedcontrols>
                            <telerik:AjaxUpdatedControl ControlID="rGridHistories"
          

         LoadingPanelID="LoadingPnlCustom" /></updatedcontrols></telerik:AjaxSetting>

 </telerik:RadAjaxManager>
                   
         <telerik:RadAjaxLoadingPanel ID="LoadingPnlCustom" runat="server"
                    BackColor="control" Transparency="15">
                    <asp:Image ID="imgCustom" runat="server"
                    ImageUrl="~/images/loadingFinal.gif" />
         </telerik:RadAjaxLoadingPanel>

 

 <telerik:RadGrid ID="rgridHistories1" runat="server" Visible="false"
                    AllowAutomaticDeletes="True" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" BorderColor="AntiqueWhite"
                    ClientSettings-EnableClientKeyValues="true"
                     GridLines="None" Height="349px"
                    LoadingTemplateTransparency="15" PageSize="20" ShowStatusBar="True"
                    skin="Outlook" Width="91%">
                    <mastertableview clientdatakeynames="UniqueId,UserName"
                    DataKeyNames="UniqueId,UserName" editmode="InPlace" gridlines="Both">
            <parenttablerelation>
            <telerik:GridRelationFields />
            </parenttablerelation>
                        <rowindicatorcolumn visible="False">
                            <HeaderStyle Width="20px" />
                        </rowindicatorcolumn>
            <expandcollapsecolumn resizable="False" visible="False">
            <HeaderStyle Width="20px" />
            </expandcollapsecolumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="Uniqueid" HeaderText="UniqueId"
                                ReadOnly="True" UniqueName="Uniqueid" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn AutoPostBackOnFilter="True"
                                ColumnEditorID="chkHistoryReviewedID" DataType="System.Boolean"
                                HeaderText="Reviewed" UniqueName="Reviewed">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkHistory" runat="server" AutoPostBack="True"
                                        Checked="false" OnCheckedChanged="History_CheckBox_Check" />
                                </ItemTemplate>
                           
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="EditHistory"
                                HeaderText="Edit" ImageUrl="~/images/ico_16_customEntity.gif"
                                Text="Update History" UniqueName="EditColumn">
                            </telerik:GridButtonColumn>
                            <telerik:GridBoundColumn DataField="ManagerNotes" HeaderText="Manager Note"
                                UniqueName="ManagerNotes" Visible="False">
                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Names="Verdana"
                                Font-Overline="False" Font-Size="X-Small" Font-Strikeout="False"
                                Font-Underline="False" ForeColor="DarkGray" HorizontalAlign="Center"
                                Wrap="True" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="UserName" HeaderText="User" ReadOnly="True"
                                UniqueName="UserName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject"
                                ReadOnly="True" UniqueName="Subject">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RecordedForUserUniqueId"
                                HeaderText="Recorded For User                                                       Unique ID"
                                ReadOnly="True" UniqueName="UserUniqueId" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RecordedwithContactUniqueId"
                                Display="False"
                                HeaderText="Recorded with                                                      Contact Unique ID"
                                ReadOnly="True" UniqueName="ContactUniqueID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Company" HeaderText="Company"
                                ReadOnly="True" UniqueName="Company">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ContactName" HeaderText="Contact Name"
                                ReadOnly="True" UniqueName="ContactName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="HType" HeaderText="Type" ReadOnly="True"
                                UniqueName="Type">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Notes" HeaderText="Details" ReadOnly="True"
                                UniqueName="Details">
                                <HeaderStyle Width="150px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RecordedTime" HeaderText="Recorded Time"
                                ReadOnly="True" UniqueName="RecordedDate">
                            </telerik:GridBoundColumn>
                            <telerik:GridHyperLinkColumn HeaderText="Attachment"
                                UniqueName="AttachmentColumn">
                            </telerik:GridHyperLinkColumn>
                        </Columns>
               
            <editformsettings>
            <editcolumn autopostbackonfilter="True" uniquename="EditCommandColumn1">
            </editcolumn>
            </editformsettings>
            </mastertableview>
           
                    <clientsettings allowcolumnsreorder="True">
                        <selecting allowrowselect="True" />
                        <scrolling allowscroll="True" usestaticheaders="True" /></clientsettings>
                    <PagerStyle Mode="NextPrevAndNumeric" Position="Top"
                    PrevPageText="&amp;lt;   " /><EditItemStyle BorderColor="#C0C0FF"
                    BorderStyle="Inset" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                    Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                    <SelectedItemStyle BackColor="LightGray" Font-Bold="False"
                    Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" Wrap="True" /></telerik:RadGrid>

 

 

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 21 Jul 2008, 03:15 PM
Hi Hrushikesh Mokashi,

Could you please try to wrap the RadGrid and the Button in a regular asp UpdatePanel and verify if the problem will still persists. This will give us direction on further researching the issue.
Also you could review the following forum post, which elaborates on this error.

Sincerely yours,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or