Ejemplo n.º 1
0
    void dock_Command(object sender, DockCommandEventArgs e)
    {
        if (e.Command.Name == "Close")
        {
            ScriptManager.RegisterStartupScript(
                UpdatePanel1,
                this.GetType(),
                "RemoveDock",
                string.Format(@"function _removeDock() {{  
    Sys.Application.remove_load(_removeDock);  
    $find('{0}').undock();  
    $get('{1}').appendChild($get('{0}'));  
    $find('{0}').doPostBack('DockPositionChanged');  
}};  
Sys.Application.add_load(_removeDock);", ((RadDock)sender).ClientID, UpdatePanel1.ClientID),
                true);
        }
    }
Ejemplo n.º 2
0
				protected void RadDock_Command(object sender, DockCommandEventArgs e)
				{
						var command = e.Command.Name;
						var tile = ((TileControlBase)((RadDock)sender).ContentContainer.Controls[0]).Tile;

						switch (command)
						{
								//Should go through JS command instead and not this
								case "Edit":
                                case "PerformanceLevel":
								case "Expand":
										ExpandTile(tile, command);
										break;

								case "Select Class":
										SessionObject.TileClicked = ((RadDock)sender).ClientID;
										SessionObject.LastElementsFolder_TileClicked = SessionObject.Elements_ActiveFolder;
										ChangeTile(tile);
										break;
						}
				}