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

Referencing Ajax in the Master from a control

1 Answer 94 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 14 Apr 2011, 02:45 PM
Hi,
I'm very new to Ajax and am trying to update a RadPanelBar on the Master page from a User Control to display or hide certain options.

The example reads like this:
1. Project page loads Control1, hide RadPanelBarItems (1 thru X) on the Master page
2. Project page loads Control 2, show RadPanelBarItems (1 thru X) on the Master page

The first page to load is Control 1, and I have been able to get #1 above to work, but then if I load Control 2 I don't get #2 above to work.

I am guessing I need to update this panelbar on the Master Page dynamically from the Project Page, but I have tried all of the examples for doing this without any luck.

RadAjaxManagerProxy's Name on the master page: "ram"
RadPanelbar's Name on the master page: "rpbMain"

Project's Page Load:
Dim AjaxManagerProxy As RadAjaxManagerProxy = CType(Me.Master.FindControl("ram"), RadAjaxManagerProxy)
Dim PanelBar As RadPanelBar = CType(Me.Master.FindControl("rpbMain"), RadPanelBar)
 AjaxManagerProxy.AjaxSettings.AddAjaxSetting(rsProjects, PanelBar)

Both Dim'd objects always return as nothing and I get an object ref not set error.

Thanks,
Jason

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 Apr 2011, 04:02 PM
Hello Jay,

Try using the RadAjaxManager.GetCurrent(Page) method to get reference to the RadAjaxManager.
Let me know if this helps.

Greetings,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Ajax
Asked by
Jay
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or