I have two page
PoliklinlList.aspx
Tanilar.ascx
I use Tanilar.ascx web user control in the Polklinik page.
Ajax manager is in the Poliklinik page.
There are two radgrid in web user controls: radTanilar and radSeciliTanilar
I want to add some value from radTanilar to radSeciliTanilar after adding I want to show it in the page.But radSeciliTanilar isn't refresh itself although my web user control is in the updatecontrol of ajax settings.
.
I manage to call my ajax manager from web user control like:
When I click the radTanilar row, TanilarRowClick event run and myRadAjaxManager1_AjaxRequest which is in the PoliklinlList page is run also.
myRadAjaxManager settings like this: (ucpTani is the Id of web user controls')
)
When I add my controls(radseciliTanilar and radTanilar) which are in web user controls manually on code like this:
I get error like this:
when I add RadAjaxManagerProxy to my user control I get the same error.
PoliklinlList.aspx
Tanilar.ascx
I use Tanilar.ascx web user control in the Polklinik page.
Ajax manager is in the Poliklinik page.
There are two radgrid in web user controls: radTanilar and radSeciliTanilar
I want to add some value from radTanilar to radSeciliTanilar after adding I want to show it in the page.But radSeciliTanilar isn't refresh itself although my web user control is in the updatecontrol of ajax settings.
.
I manage to call my ajax manager from web user control like:
function
TanilarRowClick(sender, eventArgs) {
var
id = eventArgs.getDataKeyValue(
"ID"
);
document.getElementById(
"grdTanilarDClickedRowIndex"
).value = id;
$find(
"<%= RadAjaxManager.GetCurrent(Page).ClientID %>"
).ajaxRequest(
"taniekle"
);
}
When I click the radTanilar row, TanilarRowClick event run and myRadAjaxManager1_AjaxRequest which is in the PoliklinlList page is run also.
myRadAjaxManager settings like this: (ucpTani is the Id of web user controls')
)
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"ucpTani"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
When I add my controls(radseciliTanilar and radTanilar) which are in web user controls manually on code like this:
RadGrid grdSeciliTanilar = (RadGrid)ucpTani.FindControl(
"grdSeciliTanilar"
);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, grdSeciliTanilar);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdTani, grdSeciliTanilar);
I get error like this:
Server Error in '/' Application.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +9585723
Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +221
[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +286
Telerik.Web.UI.RadAjaxControl.PerformRender() +498
Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1819
Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +155
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1284
when I add RadAjaxManagerProxy to my user control I get the same error.