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

not able to resize Raddock

5 Answers 109 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Abhi Shinde
Top achievements
Rank 1
Abhi Shinde asked on 14 Dec 2010, 05:45 AM
Hi,
       I am trying to resize the Raddoc at codebehind. But its not working. 

<telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout"
                                OnLoadDockLayout="RadDockLayout1_LoadDockLayout" >
                                <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="300" MinHeight="500"
                                    Style="float: left; margin-right: 15px" >
                                </telerik:RadDockZone>
                                <telerik:RadDockZone runat="server" ID="RadDockZone2" Width="300" MinHeight="300"
                                    Style="float: left; margin-right: 15px; background: #f5f4e8;">      
                                </telerik:RadDockZone>
                                <telerik:RadDockZone runat="server" ID="RadDockZone3" Width="300" MinHeight="300"
                                    Style="background: #d5f0fa; float: left;">
                                </telerik:RadDockZone>
                            </telerik:RadDockLayout>


private RadDock CreateRadDock()
        {
            int docksCount = CurrentDockStates.Count;
 
            RadDock dock = new RadDock();
            dock.DockMode = DockMode.Docked;
            dock.UniqueName = Guid.NewGuid().ToString().Replace("-", "a");
            dock.ID = string.Format("RadDock{0}", dock.UniqueName);
            dock.Title = txtDocTitle.Text;
            dock.Text = string.Format("Added at {0}", DateTime.Now);
            dock.Resizable = true;
            dock.Commands.Add(new DockCloseCommand());
            dock.Commands.Add(new DockExpandCollapseCommand());
 
            return dock;
        }

Can we resize "RadDockZone" also ??

waiting for reply...!!!

5 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 15 Dec 2010, 12:43 PM
Hello Abhi,

The RadDockZone is not resizable, so if you want your zones to have custom width and height, you must set it explicitly.
The RadDock control can be resized, even when docked in a zone, but cannot exceed the width and height of the containing zone. Please visit the RadDock's Resizable demo, and you will notice that the dock residing in the zone, can only be resized vertically to the full height of the zone.

Greetings,
Pero
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Abhi Shinde
Top achievements
Rank 1
answered on 16 Dec 2010, 06:13 AM
hi pero,
     thanks for reply,
I am saving state of raddocks in database. 
state of raddock is saved like -
-----------------------------------------------------------------------
{"UniqueName":"f960c918a14d6a4024aa247a3358d9ca5ced","DockZoneID":"empwidgetHome_RadDockZone1","Width":"","Height":"",
"ExpandedHeight":"0","Top":"0px","Left":"0px","Resizable":"True","Closed":"False","Collapsed":"False","Pinned":"False","Title":"Google","Text":"Added at 12/16/2010 10:37:18 AM","Tag":"http://www.google.co.in/","Index":"0"}|
------------------------------------------------------------------------
but i am not able to resize the raddock.
waiting for reply...!!!
0
Accepted
Pero
Telerik team
answered on 16 Dec 2010, 05:06 PM
Hello Abhi,

I see that you have enabled resizing of the RadDocks, but I also see that the RadDock is residing in a zone. So, could you please confirm that you are using the latest version of the RadControls, because this functionality was introduced in Q3 2010?
As I said in my previous post, the dock cannot exceed the width and height of the parent zone. Please make sure this is satisfied, i.e. the zone has enough height (or width) for the dock to be resized.

Greetings,
Pero
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Roukaya
Top achievements
Rank 2
answered on 01 Jun 2012, 11:57 AM
Hi Pero ..

you said : The RadDockZone is not resizable, so if you want your zones to have custom width and height, you must set it explicitly. 

how we can do this ???

thanks in advance .. 
0
Princy
Top achievements
Rank 2
answered on 01 Jun 2012, 01:30 PM
Hi Roukaya,

Try setting MinHeight and MinWidth of RadDockZone as follows.

C#:
RadDockZone1.MinHeight = Unit.Pixel(300);
RadDockZone1.MinWidth = Unit.Pixel(300);

Hope this helps.

Thanks,
Princy.
Tags
Dock
Asked by
Abhi Shinde
Top achievements
Rank 1
Answers by
Pero
Telerik team
Abhi Shinde
Top achievements
Rank 1
Roukaya
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Share this question
or