JavaScript - Access an Ajax Panel Through Its ID

10 posts, 1 answers
  1. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 20 Oct 2014 Link to this post

    Hello,

    I am working on a project with RadAjaxManager.
    The AJAX settings can be defined in the code behind only.
    I'm trying to access the RadAjaxPanel via the JavaScript, by its ID.
    The AjaxPanel and its ID are created by the RadAjaxManager automatically.

    How can I achieve this?

    Thanks,
    Daniel.
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 23 Oct 2014 Link to this post

    Hello Daniel,

    Could you please elaborate a bit more what exactly your are trying to achieve? The information you provided is quite confusing - you said that the AJAX settings can be defined in the code behind only, but this is not correct. You can add the ajax settings declaratively and programmatically on Page_Load.

    Regarding accessing RadAjaxPanel - using $find("<%= ControlID.ClientID %>") is the recommended way to get reference to client-side objects. What it does it to output the generated client-id in the final markup of your page.

    Also what do you mean by:The AjaxPanel and its ID are created by the RadAjaxManager automatically?

    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 06 Nov 2014 in reply to Pavlina Link to this post

    Hi Pavlina,

    Thank you for your response.

    My project requirement is that Ajax is set only in code-behind.
    What I want to do is replace the RadGrid with the RadHtmlChart.
    The problem is that the RadHtmlChart is not replaced - instead it is located under the RadGrid.

    I have attached a dummy project for example.[Example Project]
    Also, I have attached a video that shows the problem.[see video]

    I'll be glad to get a solution.

    Thanks,
    Daniel.
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 11 Nov 2014 Link to this post

    Hello,

    Thank you for the provided project and video. I will modify the example and will send it to you as soon as possible.

    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 13 Nov 2014 in reply to Pavlina Link to this post

    Hello Pavlina,

    I'm glad to hear it.
    Looking forward for your project.

    Thanks,
    Daniel.
  7. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 23 Nov 2014 in reply to Daniel Link to this post

    Hello Pavlina,

    Just a reminder: did you modify the example, so it meets my project requirements?

    Thank you,
    Daniel.
  8. Marin
    Admin
    Marin avatar
    1043 posts

    Posted 27 Nov 2014 Link to this post

    Hello,

    You can use simpler version of the ajax settings where all the buttons, grid and chart are in one single ajaxified container. I am attaching the modified project for further reference.

    Regards,
    Marin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 01 Dec 2014 in reply to Marin Link to this post

    Hello Marin,

    Thank you very much for the attached project.

    My project has a lot of controls that need to be updated individually, and NOT the whole page.

    Is there a way to still have the general AJAX definition for the panel and some of its controls, while other controls in the panel have their individual AJAX definition?

    Thank you,
    Daniel.
  10. Answer
    Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 04 Dec 2014 Link to this post

    Hi,

    In your case Panel1 is added as ajax initiator and updated control and therefore all controls placed inside it are AJAX-enabled. If you want to exclude a control from being AJAX-enabled, you can use one of the following approaches presented in this help article:
    http://www.telerik.com/help/aspnet-ajax/ajax-exclude.html#Section2

    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  11. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 07 Dec 2014 in reply to Pavlina Link to this post

    Hello Pavlina,

    Thank you very much for your reply,

    I decided to change the structure of my project and use MULTIPAGE instead.

    However, your answer did help me for a different scenario / other functionality on my project.

     Thank you again,
    Daniel.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017