Hi there,
I'm trying to migrate to RadControls for ASP.NET Ajax but I'm finding a few
difficulties. In my existing application I am using AjaxManager (with RadControls
for ASP.NET, not the
version) to ‘ajaxify’ some ASP Panel controls (ActionContainer and
ActionContainer1 in this example) by doing something like this:
RadAjaxManager1.AjaxSettings.AddAjaxSetting(ActionContainer, ActionContainer, null);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(ActionContainer1, ActionContainer1, null);
The effect I am getting is something similar to the one I’d get by using RadAjaxPanel controls. This means that ActionContainers get updated when any control inside them generates one postback. In my simple example I have two panels and each contains one button, one label, and one lisbox. A new line is added to the corresponding list box each time a button is pressed. Besides that, the label inside each panel also is updated each time it is updated.
Once again, the effect is similar to what I would get with two RadAjaxPanels but with a very important difference: their requests can get queued and therefore won’t cancel each other.
<asp:Panel runat="server" ID="ActionContainer" BorderWidth="5"> <asp:ListBox ID="ListBox" runat="server" AutoPostBack="true">
</asp:ListBox>
<asp:Button ID="DoIt" runat="server" OnClick="DoIt_Click" />
PostBack: <asp:Label ID="InnerPostBackTime" runat="server"></asp:Label>
</asp:Panel>
<asp:Panel runat="server" ID="ActionContainer1" BorderWidth="5">
<asp:ListBox ID="ListBox1" runat="server" AutoPostBack="true">
</asp:ListBox>
<asp:Button ID="DoIt1" runat="server" OnClick="DoIt1_Click" />
PostBack: <asp:Label ID="InnerPostBackTime1" runat="server"></asp:Label>
</asp:Panel>
This works fine with RadControls for ASP.NET Q1 2008 but doesn’t work with RadControls for ASP.NET Ajax Q1 2008. In the later case the labels for both panels get updated when either button is clicked.
I know that one solution for this could be adding settings for every control inside the panel - the ones that generate postbacks - but that’s something I’m trying to avoid.
The question is: is there any way to get the desired behaviour out of the Ajax RadControls?
Thanks,
Paulo