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

Moving away from RadDockLayout?

2 Answers 96 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 24 Jun 2011, 08:11 PM
Hi all,

My project has grown outside the scope of the functionality provided by RadDockLayout. I am hoping to create my own manager class which emulates the functionality currently provided to me by RadDockLayout. 

So, I have classes which inherit from RadDock and RadDockZone, CormantRadDock and CormantRadDockZone. I am letting RadDockLayout manage these objects, but it is a pain to constantly have to cast my RegisteredDocks collection constantly. In addition, I do the same sort of control regeneration that RadDockLayout provides, except applied to more controls. As such, I have a firm understanding of what is needed to manage these controls.

That being said, I would like to make sure I do not miss any hidden dependencies.

So, I use the events for RadDockLayout_SaveDockLayout and LoadDockLayout. I believe I can just append additional code to the Page_Load method to emulate what is occurring in RadDockLayout_LoadDockLayout (please correct me if this is an incorrect belief). I am unsure of how to emulate RadDockLayout_SaveDockLayout -- and would like some advice. How can my manager trigger on this event? 

Other than that, is there anything hidden going on that I should be aware of that would make removing RadDockLayout from a page full of dynamic RadDocks and RadDockZones?

Thanks

Sean

2 Answers, 1 is accepted

Sort by
0
Sean
Top achievements
Rank 2
answered on 24 Jun 2011, 11:42 PM
Hi,

I made a good attempt at this and I'm working through some minor issues now. I had a question, though.

Why is this valid when creating a new RadDock on the page:

dockZoneToDockWith.Controls.Add(radDock);

but this is not valid:

radDock.Dock(dockZoneToDockWith);

I get the error Telerik.Web.UI.WebResource.axd:15Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
is it just because the dockZoneToDockWith has just been created and doesn't exist on the page yet?
0
Accepted
Pero
Telerik team
answered on 30 Jun 2011, 07:18 AM
Hello Sean,

The radDock.Dock(dockZoneToDockWith) method of the RadDock control, adds the dock to the dockZoneToDockWith.Docks collection, which afterwards is used to render each dock in the collection and register its scripts. These two actions require that the dock and the zone be added to the Controls tree, so that their Page objects are not null. That''s the sole reason for the exception.

All the best,
Pero
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
Dock
Asked by
Sean
Top achievements
Rank 2
Answers by
Sean
Top achievements
Rank 2
Pero
Telerik team
Share this question
or