RadioButtonList + Grid + AjaxManager

4 posts, 1 answers
  1. Mike
    Mike avatar
    74 posts
    Member since:
    Mar 2013

    Posted 20 Nov 2015 Link to this post

    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. 

     

     

  2. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 24 Nov 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mike
    Mike avatar
    74 posts
    Member since:
    Mar 2013

    Posted 24 Nov 2015 in reply to Maria Ilieva Link to this post

    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!
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 25 Nov 2015 Link to this post

    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
Back to Top