This is a migrated thread and some comments may be shown as answers.

RadioButtonList + Grid + AjaxManager

3 Answers 54 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 20 Nov 2015, 09:45 PM

I have a form, on it I have two sets of Radio Button Lists, each set has AutoPostBack set to true and an event on OnSelectedIndexChanged.  The goal is to have the grid show different sets of data depending on what the user selects from the Radio Buttons.  The first RBL is either forms entered by the user or all, the second is all, complete or incomplete forms.  By default, I have set the RBL's to have "My" selected and "Incomplete".  When a user changes an RBL, the grid is refreshed with appropriate data, however if the user re-selects back to the default item, no postback happens.  If I remove the AjaxManager from the page, it works, but the whole page refreshes, not just the grid.  How can I make it work with the AjaxManager so no matter what is checked, the grid refreshes it's data.

Here is the AjaxManager code I have:

<telerik:RadAjaxManager runat="server" ID="radAjaxManager" EnableAJAX="True">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="radSafetyForms">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rblScope">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rblComplete">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

I'm not sure if I have the AjaxManager configured correctly or not. 

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 24 Nov 2015, 03:21 PM
Hi,

Try to add the RadioButtonList to updated controls like this:

<telerik:RadAjaxManager runat="server" ID="radAjaxManager" EnableAJAX="True">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="radSafetyForms">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rblScope">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
                <telerik:AjaxUpdatedControl ControlID="rblScope" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rblComplete">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
                <telerik:AjaxUpdatedControl ControlID="rblComplete" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

and see how it goes.

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 24 Nov 2015, 04:37 PM
That worked!  I wasn't aware that I could put two Ajax Updated Controls tags in a single Ajax Setting like that.  Regardless, it's working now.  Thanks!
0
Maria Ilieva
Telerik team
answered on 25 Nov 2015, 01:09 PM
Hi Mike,

I'm glad that the provided solution helps ion your case. Do not hesitate to contact us back if further assistance is needed.

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Ajax
Asked by
Mike
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Mike
Top achievements
Rank 1
Share this question
or