I am creating telerik rad grid dynamically based on the columns present in the database. Problem is, I need to attach an updatepanel.
The aspx page has the following code
<form id="aspnetForm" method="post" runat="server" style="overflow: hidden">
<asp:ScriptManager id="MainScriptManager" EnablePartialRendering="true" runat="server"></asp:ScriptManager>
<telerik:RadAjaxManager ID="TelerikAjaxManager" runat="server" EnableAJAX="true">
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="TelerikAjaxLoadingPanel" runat="server" Height="75px" Width="75px" Transparency="50">
<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
</telerik:RadAjaxLoadingPanel>
In the code behind I am creating the grid by the following code. Now I need to
specify the updatepanel for the grid (please see the red line below). If ....
GridControlTelerik
Grid = UICommon.CreateMainetGridTelerik(this, SInfo.Name, RecordId, CanUpdate && !isReadOnly, controlStyles);
TelerikAjaxManager.AjaxSettings.AddAjaxSetting(Grid, Grid, TelerikAjaxLoadingPanel);
if (mainetGrid == null) break;
.......
I do this I get the following error:
Exception information:
Exception type: Telerik.Web.UI.
Exception message: Value cannot be null.
Parameter name: page
Thread information:
at Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel)
at Main_Edit.ArrangeFieldsForEdit(ArrayList screenInfoList, ArrayList FRequiredList) in D:\...\Main_Edit.aspx.cs:line 10185
at Main_Edit.InitLegacyControls(ArrayList screenInfoList) in D:\...\Main_Edit.aspx.cs:line 3631
at Main_Edit.SetupControls() in D:\...\Main_Edit.aspx.cs:line 3256
at Main_Edit.Page_Init(Object sender, EventArgs e) in D:\...\Main_Edit.aspx.cs:line 808
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint).
Can you please help me to fix this error.
Regards,
Senthil