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

My Portal Dock Panel With Problems After Closing a dock

1 Answer 24 Views
Dock
This is a migrated thread and some comments may be shown as answers.
honggyu
Top achievements
Rank 1
honggyu asked on 02 Jan 2014, 01:15 PM
Hi, this is Tom

I have been struggling with raising issues with the demo on your website, which is My Portal dock panel.
http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx

I used the example code as provided from the page and I found a issue that it dose not let me add new dock after closing one of docks on the zones. I even tested the given example on the website.
You can test that: add two any docks and close those two docks. After that, add new a dock. then you will see the issue.
I do not know how to fix this problem, it takes me so long time to figure it out. Please let me know how to deal with it!!!!!!

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 07 Jan 2014, 11:23 AM
Hello Tom,

This is a problem with the implementation of the demo My Portal. It is already fixed and the demo will be updated with the upcoming release of RadControls for ASP.NET AJAX. Please modify the code of the example so that it matches the snippets below and the issue should be resolved:
protected void Page_Init(object sender, EventArgs e)
{
    for (int i = 0; i < CurrentDockStates.Count; i++)
    {
        if (CurrentDockStates[i].Closed == true) continue;
 
        RadDock dock = CreateRadDockFromState(CurrentDockStates[i]);
        RadDockLayout1.Controls.Add(dock);
        CreateSaveStateTrigger(dock);
        LoadWidget(dock);
        if (CurrentDockStates[i].Closed == true)
        {
            dock.Visible = false;
        }
    }
}

protected void ButtonAddDock_Click(object sender, EventArgs e)
{
    RadDock dock = CreateRadDock();
    RadDockZone dz = (RadDockZone)this.Master.FindControl("ContentPlaceHolder1").FindControl(DropDownZone.SelectedItem.Text);
 
    RadDockLayout1.Controls.Add(dock);
    dock.Dock(dz);
 
    CreateSaveStateTrigger(dock);
 
    // Ensure that the dock is opened, should be used when closed docks are
    // cleared from the dock state on Page_Init
    dock.Closed = false;
 
    dock.Tag = DroptDownWidget.SelectedValue;
    LoadWidget(dock);
}


Regards,
Slav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Dock
Asked by
honggyu
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or