RadButton is not updating user control through Ajax.

4 posts, 0 answers
  1. Kavi
    Kavi avatar
    9 posts
    Member since:
    Mar 2011

    Posted 16 Nov 2011 Link to this post

    Hi,

             We are trying to update one grid and user control by radbutton which is ajaxfied.Please find my code below.

    Button :
    =========

     

     

    <telerik:RadButton ID="btnResumeSuspend" runat="server" OnClick="btnResumeSuspend_Click">

     

     

     

    </telerik:RadButton>

     


    User control :This control will be called and updated  in button btnResumeSuspend_Click event.
    =====================================================================================

    <

     

     

    NISP:MessageControl ID="lblMessageUserControl" runat="server" EnableViewState="true" />

    btnResumeSuspend_Click event:
    ================================

     

    lblMessageUserControl.DisplayMessage(

     

    false, "Test");

    Ajax code:
    =========

     

     

     

    RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);

     

    manager.AjaxSettings.AddAjaxSetting(manager, btnResumeSuspend);
    manager.AjaxSettings.AddAjaxSetting(btnResumeSuspend, lblMessageUserControl);

    Here , after button click event, the lblMessageUserControl is not updated and not showing the message.
    Please reply as soon as early

    Thanks,
    Priya

     

  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 17 Nov 2011 Link to this post

    Hello,

    Please add Below thing in your (.aspx) page.

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnResumeSuspend">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lblMessageUserControl" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
     
    // or
     
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnResumeSuspend">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lblMessageUserControl" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>

    OR
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
            //or
            <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"></telerik:RadAjaxManagerProxy>
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadGrid1, RadGrid1);
         //or
         RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(RadGrid1, RadGrid1);

    Let me know if any concern.


    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kavi
    Kavi avatar
    9 posts
    Member since:
    Mar 2011

    Posted 18 Nov 2011 Link to this post

     

     

    RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);

     

    manager.AjaxSettings.AddAjaxSetting(manager, btnResumeSuspend);

    manager.AjaxSettings.AddAjaxSetting(btnResumeSuspend, btnResumeSuspend);

    manager.AjaxSettings.AddAjaxSetting(btnResumeSuspend, lblMessageUserControl);





    its still not working.

  5. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 18 Nov 2011 Link to this post

    Hello Kavi,

    Can you please provide your code / project ?

    Thanks,
    Jayesh Goyani
Back to Top