RadAjaxpanel not updating controls inside it

5 posts, 1 answers
  1. Gaurav
    Gaurav avatar
    7 posts
    Member since:
    Nov 2011

    Posted 08 May 2013 Link to this post

    Hi Guys,

    I have a radajaxpanel on a page. inside the radajax panel, i have a radgrid, a button, a label and a radwindow.

    On the click event of the button, i am showing the radwindow using RadWindow.visibleOnLoad = true 

    On RadWindow, i have a button, on the click event of this button, i am deleting some rows from the database and setting up a message on the label and also setting it's visible property to true. I am also using radGrid.Rebind() , radGrid.SelectedIndexes.Clear() and RadWindow.visibleOnLoad = false

    But none of these controls are updating after the request. Pop is still visible, label is not visible and radgrid is not refreshed.

    So i wrote some javascipt code

    //Close pop up
                string script = string.Format("$find('{0}').close();", radwindowClearReason.ClientID);
                pnlProcessList.ResponseScripts.Add(script);
                //Clear selected rows
                script = string.Format("$find('{0}').clearSelectedItems();", grdProcessList.ClientID);
                pnlProcessList.ResponseScripts.Add(script);
                //refresh grid
                script = string.Format("$find('{0}').ajaxRequest();", pnlProcessList.ClientID);
                pnlProcessList.ResponseScripts.Add(script);

    in the above code , pnlProcessList is the ID of RadAjaxPanel. This code is successfully closing the radWindow, refreshing the radGrid.

    But still have two problems, selected indexes are not cleared and label is not visible.

    Please help me on this. I am not sure what i am doing wrong.

    Thanks,
    Gaurav
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 13 May 2013 Link to this post

    Hi Gaurav,

    I am attaching a sample project illustrating the scenario you describe.
    On click of the button in the window a deselect event is fired for all selected items in the grid. Also the selected indexes count is shown in a second label below the "Open window" button.

    Give this code a try and let me know if it is helpful to you.
    If not would you give more details on what you want to achieve? Could you share your full source code with code-behind? This will allow me to assist you further.

    Regards,
    Victor Tachev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gaurav
    Gaurav avatar
    7 posts
    Member since:
    Nov 2011

    Posted 15 May 2013 Link to this post

    Hi Victor,
    I ran your code and it is working fine. The only difference in my setup and your sample project is that the content template in Radwindow is wrapped inside the RadAjaxPanel. I already tried the same solution you posted and found it working. But i want that button on the Radwindow to be ajax enabled.

    When i put the content template into RadAjaxPanel in the sample project, it is also not working.

    Please suggest how this could be achieved in this case.

    Thanks,
    Gaurav
  5. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 17 May 2013 Link to this post

    Hello Gaurav,

    It is not supported to nest RadAjaxPanel controls. In more complex cases as your seems to be it is recommended using RadAjaxManager control as it could handle any scenario. More information on RadAjaxManager could be found in this article.

    The RadWindow needs to initiate a postback request in order for it to be closed. If the button initiates an Ajax request the window would not be closed. Could you give more information on your scenario? Also what do you mean by the button in the RadWindow  to be Ajax-enabled? If it closes the window why would you need an Ajax request from the button. Do you have additional controls in the RadWindow that need to be updated?

    Would you share full source code so everyone who would like to assist you could better understand your case?

    Kind regards,
    Victor Tachev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Goraksh
    Goraksh avatar
    8 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    Gud....thnx dude!!! u r code worjed for me
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017