This is a migrated thread and some comments may be shown as answers.

JavaScript - Access an Ajax Panel Through Its ID

9 Answers 159 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 20 Oct 2014, 09:17 AM
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.

9 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 23 Oct 2014, 11:12 AM
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.

 
0
Daniel
Top achievements
Rank 1
answered on 06 Nov 2014, 10:04 AM
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.
0
Pavlina
Telerik team
answered on 11 Nov 2014, 09:55 AM
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.

 
0
Daniel
Top achievements
Rank 1
answered on 13 Nov 2014, 02:05 PM
Hello Pavlina,

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

Thanks,
Daniel.
0
Daniel
Top achievements
Rank 1
answered on 23 Nov 2014, 10:51 AM
Hello Pavlina,

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

Thank you,
Daniel.
0
Marin
Telerik team
answered on 27 Nov 2014, 09:56 AM
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.

 
0
Daniel
Top achievements
Rank 1
answered on 01 Dec 2014, 10:55 AM
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.
0
Accepted
Pavlina
Telerik team
answered on 04 Dec 2014, 09:42 AM
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.

 
0
Daniel
Top achievements
Rank 1
answered on 07 Dec 2014, 11:59 AM
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.
Tags
Ajax
Asked by
Daniel
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Daniel
Top achievements
Rank 1
Marin
Telerik team
Share this question
or