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

My Portal + user controls in title

1 Answer 78 Views
Dock
This is a migrated thread and some comments may be shown as answers.
BradleyDean
Top achievements
Rank 1
BradleyDean asked on 27 Feb 2008, 07:50 AM
I'm using user controls that are only one line tall. It looks great when put into the title of the dock with the dock itself empty:

objDock.TitlebarTemplate = Page.LoadTemplate("/Reports/Controls/searchDate.ascx");

I need to load these docks dynamically like in the 'My Portal' example. I think this is the line to modify:

            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, DropDownZone.SelectedValue),
            true);

But I'm not sure what needs to be changed. Is this going to be possible?

1 Answer, 1 is accepted

Sort by
0
BradleyDean
Top achievements
Rank 1
answered on 27 Feb 2008, 09:06 PM
Found it. In the sample the user control is loaded in LoadWidet.

Just change:

dock.ContentContainer.Controls.Add(widget);

To:

dock.TitlebarContainer.Controls.Add(widget);

Tags
Dock
Asked by
BradleyDean
Top achievements
Rank 1
Answers by
BradleyDean
Top achievements
Rank 1
Share this question
or