Hello
I'm trying to do something similar to what is shown in Controls --> RadAjax --> General FAQ and How-to -->Load user controls in the documentation.
I have a RadSplitter with 3 panes on a MasterPage. The left pane contains a couple buttons that expand the middle pane when clicked - the middle pane contains a PlaceHolder control and I load in the user control as follows:
Me.oCtrlDemo = LoadControl("~\user_controls\events_pane.ascx")
Me.PlaceHolder1.Controls.Add(Me.oCtrlDemo)
So far so good. This UserControl contains a list of 5 buttons, and each button calls a JavaScript function as follows (the JavaScript functions are declared at the top of the UserControl within a RadCodeBlock):
<asp:ImageButton ID="btnGridReport" runat="server" ImageUrl="~/images/events/document.png"
onclientclick="show_EventInfoGrid(); return false;" ToolTip="Event Info Grid" />
When AJAX is disabled, I can click on a button in the UserControl and the JavaScript function is called - however, when AJAX is enabled, I get an error that the JavaScript function (show_EventInfoGrid()) cannot be found.
Here is the AjaxManager code from the MasterPage:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnEventsUsers">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PlaceHolder1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnSecurityPane">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PlaceHolder1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Have been struggling with this - any suggestions greatly appreciated
Thanks
Brian
I'm trying to do something similar to what is shown in Controls --> RadAjax --> General FAQ and How-to -->Load user controls in the documentation.
I have a RadSplitter with 3 panes on a MasterPage. The left pane contains a couple buttons that expand the middle pane when clicked - the middle pane contains a PlaceHolder control and I load in the user control as follows:
Me.oCtrlDemo = LoadControl("~\user_controls\events_pane.ascx")
Me.PlaceHolder1.Controls.Add(Me.oCtrlDemo)
<asp:ImageButton ID="btnGridReport" runat="server" ImageUrl="~/images/events/document.png"
onclientclick="show_EventInfoGrid(); return false;" ToolTip="Event Info Grid" />
When AJAX is disabled, I can click on a button in the UserControl and the JavaScript function is called - however, when AJAX is enabled, I get an error that the JavaScript function (show_EventInfoGrid()) cannot be found.
Here is the AjaxManager code from the MasterPage:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnEventsUsers">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PlaceHolder1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnSecurityPane">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PlaceHolder1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Have been struggling with this - any suggestions greatly appreciated
Thanks
Brian