Dear Sir,
I have a problem with the following scenario:
I have nested user controls as following
where
UserControl1:
- has RadAjaxLoadingPanel1 and has the RadAjaxManager defined as following:
UserControl2:
Now the scenario is:
- When you open the form for first time and click on btnAddNewRow on UserControl2. ClientEvents-OnRequestStart is working fine and show the loading panel on all the form.
- Use btnSave on UserControl1. ClientEvents-OnRequestStart is working fine and show the loading panel on all the form.
- After Form return. click on btnAddNewRow on UserControl2. Form is sending Ajax request but ClientEvents-OnRequestStart is not triggered any more from the nested control so the loading panel not appears.
- Use btnSave on UserControl1. ClientEvents-OnRequestStart is working fine and show the loading panel on all the form.
I tried to add the following code to the page load of UserControl2. but that didn't help :(
Thanks,
Mohamed Ramadan
I have a problem with the following scenario:
I have nested user controls as following
<userControl1> <table runat="server" id="tblTimesheet"> <tr> <td> <asp:Button runat="server" ID="btnSave" Text="Save"/> <userControl2></userControl2> </td> </tr> </table></userControl1>where
UserControl1:
- has RadAjaxLoadingPanel1 and has the RadAjaxManager defined as following:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="Timesheet_RequestStart" ClientEvents-OnResponseEnd="Timesheet_ResponseEnd"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnSave"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="tblTimesheet"/> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadCodeBlock runat="server" ID="scriptBlock"> <script type="text/javascript"> var currentLoadingPanel = null; var currentUpdatedControl = null; function Timesheet_RequestStart(sender, args) { currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>"); currentUpdatedControl = "<%= tblTimesheet.ClientID %>"; //show the loading panel over the updated control currentLoadingPanel.show(currentUpdatedControl); } function Timesheet_ResponseEnd() { //hide the loading panel and clean up the global variables if (currentLoadingPanel != null) currentLoadingPanel.hide(currentUpdatedControl); currentUpdatedControl = null; currentLoadingPanel = null; } </script></telerik:RadCodeBlock>UserControl2:
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnAddNewRow"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="tblTimesheetSection"/> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy><table class="TimesheetSectionTable" runat="server" id="tblTimesheetSection"></table><asp:Button runat="server" ID="btnAddNewRow" Text="Add New"/>Now the scenario is:
- When you open the form for first time and click on btnAddNewRow on UserControl2. ClientEvents-OnRequestStart is working fine and show the loading panel on all the form.
- Use btnSave on UserControl1. ClientEvents-OnRequestStart is working fine and show the loading panel on all the form.
- After Form return. click on btnAddNewRow on UserControl2. Form is sending Ajax request but ClientEvents-OnRequestStart is not triggered any more from the nested control so the loading panel not appears.
- Use btnSave on UserControl1. ClientEvents-OnRequestStart is working fine and show the loading panel on all the form.
I tried to add the following code to the page load of UserControl2. but that didn't help :(
Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)manager.ClientEvents.OnRequestStart = "Timesheet_RequestStart"manager.ClientEvents.OnResponseEnd = "Timesheet_ResponseEnd"Thanks,
Mohamed Ramadan