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

"Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method" when filter or order GridTemplateColumns

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 15 Nov 2010, 04:21 PM
Hi,

I have a problem when i try to filter or group by any column of GridTemplateColumn Type, with anyother type there is no problem.
ther specific exception is: Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
(Exception Screenshot is attached)

The declaration for the specific column is:
<telerik:GridTemplateColumn HeaderText="GMT" SortExpression="GMT" UniqueName="GMT" >
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemTemplate>
<asp:Label runat="server" ID="lblGMT" Text='<%# Bind("GMT") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<br />
<telerik:RadNumericTextBox runat="server" Width="100px" ID="txtGMT" Text='<%# Bind("GMT") %>'  DataType="System.Int16" MaxValue="12" MinValue="-12" NumberFormat-DecimalDigits="0" ShowSpinButtons="true" />
<span style="color: Red">*</span><br />                                           
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtGMT"
ErrorMessage="This field is required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</EditItemTemplate
</telerik:GridTemplateColumn>

The scenario:
I have  a MutliView and tabstrips. I have a PageView that contains a combobox and a Radgrid, all with RadAjaxManagerProxy with a MasterPage. The combobox updates the RadGrid, everything works fine just when i try to filter or group by those kind of columns the app crushes with the exception.

I hope you can help me.

Best Regards.
-Luis

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 18 Nov 2010, 04:11 PM
Hi Luis,

This error indicates that a handler is trying to be attached to a javascript event but it failed. Unfortunately it is not clear what might be the reason for this. The column definition you posted looks fine. However you can check the following:
1. Whether you have any client-side scripts that can cause this error, and especially if you attach event handlers client-side.
2. Whether you have configured correctly the AjaxManagerPoxy in the master/content scenario. For more information you can check this help topic as well as ajaxify and update controls in master and content page . Also you see if the error is thrown again if you temporary disable the ajaxifying for the page
3. As a last you can check the RequiredFieldValidator since it also might generate client-side scripts, try temporary disabling it and see if error is thrown again.

Let me know how this works for you and if you need any further assistance.

Greetings,
Marin
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Luis
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or