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

Dock creation

6 Answers 120 Views
Dock
This is a migrated thread and some comments may be shown as answers.
rebtech
Top achievements
Rank 1
rebtech asked on 17 Jul 2007, 08:28 PM
I am testing one of your example and I don't remember were I got it from so I am posting a new thread.  in the example you add the dock to a zone when it is added to the page with the following line of code ScriptManager.RegisterStartupScript(dock, Me.[GetType](), "AddDock", String.Format("function _addDock() {{" + "Sys.Application.remove_load(_addDock);" + "$find('{1}').dock($find('{0}'));" + "$find('{0}').doPostBack('DockPositionChanged');" + "}};" + "Sys.Application.add_load(_addDock);", dock.ClientID, ZoneLeft.ClientID), True)

How can I add the dock to the page with adding it directly to a zone?

Thanks

6 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 18 Jul 2007, 06:59 AM
Hi rebtech,

You can use the following approach:

RadDockZone1.Controls.Add(dock)

where RadDockZone1 is the ID of a zone and dock is a RadDock object.
Hope this helps.

Kind regards,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
rebtech
Top achievements
Rank 1
answered on 18 Jul 2007, 08:46 AM

I'm sorry I meant to ask (How can I add the dock to the page

without

adding it directly to a zone?) because in the example you are adding ti the 1st zone.

thanks

0
rebtech
Top achievements
Rank 1
answered on 18 Jul 2007, 08:46 AM

I'm sorry I meant to ask (How can I add the dock to the page

without

adding it directly to a zone?) because in the example you are adding ti the 1st zone.

thanks

0
Petya
Telerik team
answered on 18 Jul 2007, 09:00 AM
Hi rebtech,

In this case, just add the docks to the RadDockLayout:

RadDockLayout1.Controls.Add(dock)

Let me know if you have more troubles.

All the best,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
rebtech
Top achievements
Rank 1
answered on 18 Jul 2007, 09:18 AM
that doesn't work because it's being created through an updatepanel using ajax, but I found the orignal thread I got it from.

thanks for your help
0
Petya
Telerik team
answered on 18 Jul 2007, 02:14 PM
Hello rebtech,

I believe this issue is discussed in this thread. I am pasting the answer again here as we try to keep the other thread as clean as possible and your question is not closely related to the PortalSite example but more to a general work with the control:

"In Valeri's example the docks are first added to a hidden update panel and then moved to a zone. To add the dock to the page without adding it to a zone one option is to simply add the dock to the update panel

UpdatePanel1.ContentTemplateContainer.Controls.Add(dock);

but you need to make the panel visible.

The other possibility is to directly add them the RadDockLayout as I explained in this thread without using the hidden update panel at all. I am attaching a simple page demonstrating this possibility. Please, note that my page is just an example and there is no preservation of state or recreation of the objects - it merely adds dynamically a dock to the page."



Kind regards,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
rebtech
Top achievements
Rank 1
Answers by
Petya
Telerik team
rebtech
Top achievements
Rank 1
Share this question
or