Dock DefaultCommands Problem

2 posts, 0 answers
  1. ali
    ali avatar
    13 posts
    Member since:
    Dec 2008

    Posted 16 Apr 2009 Link to this post

    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...

     

     

     
  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 17 Apr 2009 Link to this post

    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
Back to Top