0
votes

I have an ASP.Net RadioButtonList control with AutoPostBack set to true and a server side handler for the SelectedIndexChanged event.

<asp:RadioButtonList runat="server" ID="btnAcceptReject" RepeatDirection="Horizontal" CssClass="checkboxlist borderless" ValidationGroup="data" AutoPostBack="true" OnSelectedIndexChanged="radioButtonList_SelectedIndexChanged">
    <asp:ListItem Text="The edition is hereby validated for conformity to standards" Value="0" Selected="True"></asp:ListItem>
    <asp:ListItem Text="The edition does not meet standards and still has to be reviewed" Value="1"></asp:ListItem>
</asp:RadioButtonList>

I am using a RadAjaxManager, a telerik control, to handle ajax postbacks

<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManagerPRoxy1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnAcceptReject">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlControls" />
            </UpdatedControls>
        </telerik:AjaxSetting>
</AjaxSettings>

pnlControl is a panel on the page containing controls that will be enabled/disabled depending on which radio button was checked.

The above always performs a full postback of the page.

how can i make it perform an ajax partial postback?

1

1 Answers

0
votes

Could it be a result of you using RadAjaxManagerProxy instead of RadAjaxManager?

RadAjaxManagerProxy expects that there is a RadAjaxManager declared elsewhere within a Master Page etc.

If that fails then I suggest to alter the pnlControl to become a RadAjaxPanel and then remove the RadAjaxManagerProxy declaration as the RadAjaxPanel will do all the work for you.

Good luck!


In reply to your comments, I would now suggest to do the following within the referencing ASPX page (if that is possible under your scenario):

  • Add a RadAjaxManagerProxy to the client-side
  • Within the code-behind add a new Sub to be called during Page_Load (outside the postback check)
  • Within the Sub:

Dim panel As Panel = CType(myUserControl.FindControl("pnlControls"),Panel) Dim radio As RadioButtonList = CType(myUserControl.FindControl("btnAcceptReject"), RadioButtonList)

RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(radio, panel, Nothing)

*Nothing - Optionally a RadAjaxLoadingPanelID if you have one declared on the .ASPX page

Hope it helps!