Ajax item in order to allow Radgrid Items to be inserted first.

2 posts, 0 answers
  1. Jason
    Jason avatar
    19 posts
    Member since:
    Mar 2009

    Posted 30 Dec 2009 Link to this post

    Problem: I have a RadGrid that upon updating, deleting, and inserting needs to update a RadChart on the page.  I have tried the RadAjaxManager codeblock below (fig. 1) but they seem to update all at the same time and the new changes do not appear until the next ajax action.  The chart is in a control which is on a RadAjaxPanel (RadAjaxPanel1).


    I have also tried to create a trigger in the codebehind (fig. 2) but I get errors.  I’m not sure if this is even possible being that I am using the built in buttons in the radgrid that do not have IDs.


    Finally, I tried setting ClientEvents-OnResponseEnd="updatechart" to try to update the chart after insert insert which seemed to be the most promising being that I could see the alert get fired at the end of the radgrid update which I put in to test it but I kept getting null errors.  That java script code is below also (fig. 3).


    I have spent hours on the telerik website trying to find a solution that works on this problem.  Any help would be greatly appreciated.



    (Fig. 1)

     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"



                <telerik:AjaxSetting AjaxControlID="RadGrid1">


                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />







     (Fig. 2)

    protected void RadAjaxPanel1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)


            AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();

            trigger.ControlID = Button1.ID; //<--not sure what this is suppose to be





    (Fig. 3)

                    function updatechart() {


                        //shot alert after steps updated!




                        //var ajaxMgr = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>");



  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 04 Jan 2010 Link to this post

    Hi Adisa,

    Please check out this help topic on how to ajaxify control wrapped in RadAjaxPanel with RadAjaxManager. In this case, I assume you do not need to handle neither the AjaxSettingCreating server-side nor the OnResponseEnd client-side event. However, you might still need to re-bind the chart on RadGrid UpdateCommand/InsertCommand/DeleteCommand or ItemCommand server-side event.

    Let me know if this helps.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top