Hi,
first of all I have the following problem:
I use a RadProxy in a Usercontrol. It is not possible to set UpdatePanelsRenderMode declarative on the proxy.
I can set it programatically BUT - this overrides the Manager settings.
So what if I need Inline in my control - but the Controls user wants to have block?
The next problem is really a problem (bug?) - or I do something wrong.
Assume a usercontrol which has 3 controls that should be updated via an async call to the manager.
If I do this inline it would look like this:
Now I use these things in a usercontrol - using a proxy.
Therefore I have to set the things in code.
I could do this:
But this (I gues would be equivalent to):
So I decided to "block" the things like this:
This works (controls are updated) - BUT I loose Inline Render mode!
No problem for the hidden fields - but a problem with the grid.
My workaround:
Am I doing something wrong?
Regards
Manfred
first of all I have the following problem:
I use a RadProxy in a Usercontrol. It is not possible to set UpdatePanelsRenderMode declarative on the proxy.
I can set it programatically BUT - this overrides the Manager settings.
So what if I need Inline in my control - but the Controls user wants to have block?
The next problem is really a problem (bug?) - or I do something wrong.
Assume a usercontrol which has 3 controls that should be updated via an async call to the manager.
If I do this inline it would look like this:
| <telerik:RadAjaxManager ID="ramManager" runat="server" DefaultLoadingPanelID="alpPan1" > |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="ramManager"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="lblCurDir" /> |
| <telerik:AjaxUpdatedControl ControlID="lblCurFile" /> |
| <telerik:AjaxUpdatedControl ControlID="imgPreview" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
Therefore I have to set the things in code.
I could do this:
| RadAjaxManager aM = RadAjaxManager.GetCurrent(Page); |
| if (aM == null) { |
| Response.Write("XFileExplorer needs an ajax manager in the page holding the control!"); |
| Response.End(); |
| return; |
| } |
| //calling ajax function changes grid and hidden fields - so add settings |
| aM.AjaxSettings.AddAjaxSetting(aM, hfCurDir); |
| aM.AjaxSettings.AddAjaxSetting(aM, hfCurFile); |
| aM.AjaxSettings.AddAjaxSetting(aM, rgBackupFiles); |
| aM.UpdatePanelsRenderMode = UpdatePanelRenderMode.Inline; |
| <telerik:RadAjaxManager ID="ramManager" runat="server" DefaultLoadingPanelID="alpPan1" > |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="ramManager"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="lblCurDir" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ramManager"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="lblCurFile" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ramManager"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="imgPreview" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| AjaxSetting aS = new AjaxSetting(aM.ID); |
| string strLoadPanelID=aM.DefaultLoadingPanelID; //use default loading panel |
| aS.UpdatedControls.Add(new AjaxUpdatedControl(rgBackupFiles.ID, strLoadPanelID)); |
| aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurDir.ID,strLoadPanelID)); |
| aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurFile.ID,strLoadPanelID)); |
| aM.AjaxSettings.Add(aS); |
| aM.UpdatePanelsRenderMode = UpdatePanelRenderMode.Inline; |
No problem for the hidden fields - but a problem with the grid.
My workaround:
| //calling ajax function changes grid and hidden fields - so add settings |
| AjaxSetting aS = new AjaxSetting(aM.ID); |
| string strLoadPanelID=aM.DefaultLoadingPanelID; //use default loading panel |
| //CANT DO THIS - WOULD REMOVE RENDER MODE aS.UpdatedControls.Add(new AjaxUpdatedControl(rgBackupFiles.ID, strLoadPanelID)); |
| aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurDir.ID,strLoadPanelID)); |
| aS.UpdatedControls.Add(new AjaxUpdatedControl(hfSaveCurFile.ID,strLoadPanelID)); //add extra to preserver inline mode |
| aM.AjaxSettings.Add(aS); |
| aM.UpdatePanelsRenderMode = UpdatePanelRenderMode.Inline; |
| aM.AjaxSettings.AddAjaxSetting(aM, rgBackupFiles); |
Am I doing something wrong?
Regards
Manfred
