
I am getting javascript Error “Error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.”
When I use RadAjaxManager inside RadGrid’s EditFormSettings
<telerik:RadGrid
<MasterTableView
<EditFormSettings
<FormTemplate>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadComboBox1" EventName="RadComboBox1_SelectedIndexChanged">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadComboBox2" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
9 Answers, 1 is accepted
You are getting this error, because RadAjaxManager should not be used inside RadGrid’s EditFormSettings. In order to achieve the desired functionality, please set RadGrid as updated control.
For more information about RadAjaxManager, please refer to the following help article:
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Hi,
When I try to add RadAjaxManager inside Grid’s Form Template it gives me error.
“Sys.WebForms.PageRequestManagerServerErrorException:Object reference not set to an instance of an object.”
I think that we might not be able to add RadAjaxManager inside Grid, Is there any other way where I can get my solution.
Please note that you should not add RadAjaxManager inside RadGrid FormTemplate.
I suggest you review the following online example which handles the desired functionality. Please give it a try and see if it works as expected:
http://demos.telerik.com/aspnet-ajax-beta/grid/examples/dataediting/popupeditform/defaultcs.aspx
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Yes that’s true, we should avoid RadAjaxManager inside RadGrid, but I want that when I am adding or editing record some combobox value should be change and also there will be some operation on server site on changing control’s value.
In given link example RadAjaxManager
set with checkbox and RadGrid that is outside of the Grid.
My requirement is that I want ajaxify controls which are inside <
EditFormSettings
template.
Will you please suggest me what I should do in this case?
To achieve your goal you need to reference the controls from the Edit form and add AjaxSettings for them in the RadAjaxManager.AjaxSettings collection. You can achieve this in the ItemCreated event hander.
For further information I will suggest you examine the following articles:
http://www.telerik.com/help/aspnet-ajax/ajxaddajaxsettingsprogrammatically.html
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/dynamicajaxsettings/defaultcs.aspx
Sincerely yours,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Even i faced the same problem..used the below code but it didnt Worked.Listbox seems to refresh on username text Changed
ItemCreated Event
Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem)
Dim raditem1 As New RadComboBoxItem
Dim raditem2 As New RadComboBoxItem
Dim raditem3 As New RadComboBoxItem
Dim raditem4 As New RadComboBoxItem
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
Dim txtuserName As TextBox = DirectCast(item.FindControl("txtuserName"), TextBox)
Dim txtpassword As TextBox = DirectCast(item.FindControl("txtpassword"), TextBox)
Dim lstbLocations As ListBox = DirectCast(item.FindControl("lstbLocations"), ListBox)
RadAjaxManager1.AjaxSettings.AddAjaxSetting(txtuserName, lstbLocations)
END IF
Could you please prepare and send us a simple running project, with which we can reproduce the problem locally? Thus we can research what is causing it and provide a solution.
All the best,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

I was also facing the same problem. Error was a run-time error in the code-behind file. To find the exact error, please debug your functionality step by step. I hope you will be able to figure-out the error.
Thanks,
Sarjeet

Also i am getting the same erro for calender control code.I am using as it is site code for special days caleder.
_headerImage =
DirectCast(RadCalendar1.FindControl("HeaderImage"), Image)
_footerImage =
DirectCast(RadCalendar1.FindControl("FooterImage"), Image)
AddImages(RadCalendar1.CalendarView)
Problem is in given below line in -AddImages function
_headerImage.ImageUrl =
"Imagepath"