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

RadDock position in RadDockZone

4 Answers 204 Views
Dock
This is a migrated thread and some comments may be shown as answers.
madhu
Top achievements
Rank 1
madhu asked on 07 Jun 2007, 04:12 PM
Hi
I am creating dynamic RadDocks when a panelbar Items are clicked.
I am creating all of them in the same Zone.
When new one is created I want the new RadDock to be created at the starting position of the zone.
I mean the new RadDock should be at position 1 in RadDockZone.
How to set the position of RadDock at the creation time itself within in the RadDockZone?
Can I get solution for this.
Thank you.

4 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 08 Jun 2007, 06:34 AM
Hello madhu,

If you are using code like this to add your RadDock controls:
ScriptManager.RegisterStartupScript(
  dock,
  this.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);


You need to modify the following line to accomplish your requirement:
   "$find('{1}').dock($find('{0}', 0));" +

0 is the zero based index, where the new dock should be docked.

Sincerely yours,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris
Top achievements
Rank 1
answered on 06 Aug 2007, 07:51 PM
Hi,

I modified my code as you stated from your code.  

   "$find('{1}').dock($find('{0}', 0));" +


But I still don't get the new dock to come up at the first position from the dockzone.  It always added to the end.  Any idea why? or any other places I need to change/update?
0
madhu
Top achievements
Rank 1
answered on 06 Aug 2007, 08:09 PM
Hi Chris

It should be
  "$find('{1}').dock($find('{0}'), 0);" +
This should work
Check it.

0
Chris
Top achievements
Rank 1
answered on 06 Aug 2007, 08:27 PM
My careless mistake. Thanks Madhu, it works!  =)
Tags
Dock
Asked by
madhu
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Chris
Top achievements
Rank 1
madhu
Top achievements
Rank 1
Share this question
or