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

Sys.ArgumentNullException: Value cannot be null Parameter name: handler

6 Answers 1023 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zubair
Top achievements
Rank 1
Zubair asked on 19 Aug 2008, 12:49 PM

hi, I have a Grid that updates through a User control and uses LINQ in the background and everything works fine until I Edit/Update few times. The problem  is that the grid freezes after I update a couple of times and I get this javascript error. RadGrid.NET2.dll assembly version number is 5.1.3.0. Please help me solve it as this is very urgent. Thanks in anticipation.

Here's my code.

<

asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

<AjaxSettings><telerik:AjaxSetting AjaxControlID="rgProperties"><UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rgProperties" /></UpdatedControls>

</telerik:AjaxSetting></AjaxSettings></telerik:RadAjaxManager>

 <rad:RadGrid ID="rgProperties" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="False" EnableAJAX="True" GridLines="None" onneeddatasource="rgProperties_NeedDataSource" Height="700px" OnDeleteCommand="rgProperties_DeleteCommand" OnUpdateCommand="rgProperties_UpdateCommand">

 <clientsettings> <scrolling allowscroll="True" usestaticheaders="True" /> </clientsettings>

<

MasterTableView DataKeyNames="Id" Width="100%">

<

RowIndicatorColumn Visible="False"><HeaderStyle Width="50px"></HeaderStyle>

</

RowIndicatorColumn><ExpandCollapseColumn Visible="true" Resizable="False">

<

HeaderStyle Width="200px"></HeaderStyle>

</

ExpandCollapseColumn>

 <Columns>

 <rad:GridEditCommandColumn EditText="Edit" UpdateText="Update" CancelText="Cancel" UniqueName="EditButtonColumn"></rad:GridEditCommandColumn>

 <rad:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" ConfirmText="Are you sure?" />

 <rad:GridBoundColumn UniqueName="Ref#" HeaderText="RefNo" DataField="RefNo"/>

 <rad:GridBoundColumn UniqueName="Name" HeaderText="Name" DataField="Name"/>

 <rad:GridBoundColumn UniqueName="Description" HeaderText="Description" DataField="Description"/>

 <rad:GridBoundColumn UniqueName="Price" HeaderText="Price" DataField="Price"/>

 <rad:GridBoundColumn UniqueName="Available For" HeaderText="Available For" DataField="idAvailableFor"/>

 <rad:GridBoundColumn UniqueName="Availability" HeaderText="Availability" DataField="idAvailability"/>

 <rad:GridBoundColumn UniqueName="Status" HeaderText="Status" DataField="idStatus"/>

 <rad:GridBoundColumn UniqueName="Property Type" HeaderText="Property Type" DataField="idPropertyType"/>

 <rad:GridBoundColumn UniqueName="Property City" HeaderText="Property City" DataField="IdPropertyCity"/>

 <rad:GridBoundColumn UniqueName="Property Area" HeaderText="Property Area" DataField="IdPropertyArea"/>

 </Columns>

 <EditFormSettings CaptionFormatString="Edit details for Property with Ref Number {0}" CaptionDataField="RefNo" UserControlName="EmployeeDetailsCS.ascx" EditFormType="WebUserControl">

 <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle>

 <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle>

 <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>

 <EditColumn ButtonType="ImageButton" />

 </EditFormSettings>

 <EditFormSettings UserControlName="~/UserControls/Properties/PropertyEditInsertForm.ascx" EditFormType="WebUserControl">

 <EditColumn UniqueName="EditButtonColumn">

 </EditColumn>

 </EditFormSettings>

</

MasterTableView>

</

rad:RadGrid>

6 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 20 Aug 2008, 06:24 AM
Hi Zubair,

There is nothing wrong with the markup expect the double ajaxification you've configured. I suggest you disable the Grid built-in AJAX mode (set EnableAJAX to false of the Grid) to be able to ajaxify it by the AJAX Manager.

Can you please share what the JS error states? Do you get it if you disable AJAX temporary (by setting both EnableAJAX to false for the AJAX Manager and the Grid)?

Sincerely yours,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Zubair
Top achievements
Rank 1
answered on 20 Aug 2008, 06:31 AM
Oh yes setting EnableAjax="false" does the trick, the Grid is now fully updating/canceling. I got the same JS error as the title of this thread.

I'm new to RadGrid, can you please tell us in which cases we should use RadAjaxManager, ScriptManager and EnableAjax="true" options to avoid these issues.Oh and I copied the RajAjaxManager script from Telerik Grid samples after I faced this problem while updating the grid and I only had Script Manager and EnableAjax="true" options set.
0
Zubair
Top achievements
Rank 1
answered on 20 Aug 2008, 06:34 AM
And this is not relevant but I always get a 'document.body is null or not an object' exception on the same page even on the first page load, is there something wrong ?
0
Sebastian
Telerik team
answered on 25 Aug 2008, 07:38 AM
Hi Zubair,

It seems that some custom javascript fails in your particular case or DOM objects/html elements that are attempted to be accessed on the client are not available at a given time. Can you please debug your jscript code to see what causes the erroneous behavior?

Additionally, since you are using a trial version of our controls, I recommend you migrate to their ASP.NET AJAX counterparts since they expose richer client-side capabilities/improved performance. Further information about RadGrid/RadAjax for ASP.NET AJAX you can gather from these online resources:

http://www.telerik.com/products/aspnet-ajax/faq.aspx

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Ajax/Examples/Overview/DefaultCS.aspx
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Overview/DefaultCS.aspx

http://www.telerik.com/help/aspnet-ajax/introduction.html

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
James
Top achievements
Rank 1
answered on 28 Mar 2011, 11:30 PM
Just try adding this to your scriptmanager settings

ScriptMode

 

 

="Release"

 

0
Mehmet
Top achievements
Rank 1
answered on 23 Apr 2014, 07:36 PM
Thank you James adding ScriptMode="Release" to the RadScriptManager worked.

<telerik:RadScriptManager ID="radsm1" runat="server" ScriptMode="Release" />
Tags
Grid
Asked by
Zubair
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Zubair
Top achievements
Rank 1
Sebastian
Telerik team
James
Top achievements
Rank 1
Mehmet
Top achievements
Rank 1
Share this question
or