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

Dock DefaultCommands Problem

1 Answer 58 Views
Dock
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 16 Apr 2009, 02:22 PM
Hi

I creat dynamic dock and I add defaultcommands attribute. but not working.

//this is not working..

dock.DefaultCommands = Telerik.Web.UI.Dock.

DefaultCommands.ExpandCollapse;

 

//but this attr. working good
dock.Collapsed =

 

true;

thank you...

 

 

 

1 Answer, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 17 Apr 2009, 02:15 PM
The RadDock.Collapsed property is responsible to display collapsed or expanded RadDock on the client.
If you set dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse;  - this means that the RadDock will be created only with Expand/Collapse commands (e.g. without Close and Pin commands).
I tried the following code
 protected override void OnInit(EventArgs e)  
    {  
        base.OnInit(e);  
        RadDock dock = new RadDock();  
        dock.ID = "RadDock1";  
        RadDockLayout1.Controls.Add(dock);  
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse;   
         
    } 
And the RadDock has only an ExpandCollapse command on the client- which is correct
Tags
Dock
Asked by
ali
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or