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

Dynamic Dock Zone Layout

1 Answer 118 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Stuart
Top achievements
Rank 1
Stuart asked on 23 Sep 2008, 07:57 AM
Over the last few weeks i have been working on a dynamic CMS that is widget based , and a thing that has been puzelign me for a while was how to make the layout of the zone orientation dynamic so a single page can have diferent orientation for docking zones.

There is an example of the method I use to retireve my zones in a dynamic layout style

 /// <summary>  
        /// Get a Rad Tab Layout 1  
        /// </summary>  
        /// <param name="zone1"></param>  
        /// <param name="zone2"></param>  
        /// <param name="zone3"></param>  
        /// <param name="zone4"></param>  
        /// <param name="zone5"></param>  
        /// <returns>A table with RadDockZones oriented 1 Cell row, then 3 column rows then a single cell row</returns>  
        public static Table GetLayout1(RadDockZone zone1, RadDockZone zone2, RadDockZone zone3, RadDockZone zone4, RadDockZone zone5)  
        {  
            Table table = new Table();  
            TableRow tr1 = new TableRow();  
            TableRow tr2 = new TableRow();  
            TableRow tr3 = new TableRow();  
 
            TableCell td1 = new TableCell();  
            TableCell td2 = new TableCell();  
            TableCell td3 = new TableCell();  
            TableCell td4 = new TableCell();  
            TableCell td5 = new TableCell();  
 
            td1.Controls.Add(zone1);  
            td2.Controls.Add(zone2);  
            td3.Controls.Add(zone3);  
            td4.Controls.Add(zone4);  
            td5.Controls.Add(zone5);  
 
 
            tr1.Controls.Add(td1);  
            tr2.Controls.Add(td2);  
            tr2.Controls.Add(td3);  
            tr2.Controls.Add(td4);  
            tr3.Controls.Add(td5);  
 
            table.Controls.Add(tr1);  
            table.Controls.Add(tr2);  
            table.Controls.Add(tr3);  
 
            table.CellPadding = 0;  
            table.CellSpacing = 0;  
            table.Style["width"] = "100%";  
 
            td1.ColumnSpan = 3;  
            td5.ColumnSpan = 3;  
 
            return table;  
        } 

As you can see applying more methods with diferent implementations of the table control the possibilities are endless.

1 Answer, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 24 Sep 2008, 12:32 PM
Hello Stuart,

Thank you for sharing your solution with the community.
If you have any questions related to Telerik's controls or you need assistance, do contact us providing detailed information about the issue you experience. We will be glad to help you.

Best regards,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
Stuart
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Share this question
or