My Portal + user controls in title

2 posts, 0 answers
  1. BradleyDean
    BradleyDean avatar
    15 posts
    Member since:
    Oct 2006

    Posted 27 Feb 2008 Link to this post

    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?
  2. BradleyDean
    BradleyDean avatar
    15 posts
    Member since:
    Oct 2006

    Posted 27 Feb 2008 Link to this post

    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);

Back to Top