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

Put a user control in dockzone?

6 Answers 140 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Elton
Top achievements
Rank 1
Elton asked on 24 Oct 2007, 01:47 AM
Hello,
As title, my question is if we can put a user control in a dockzone?

Cheers,
Elton

6 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 24 Oct 2007, 09:26 AM
Hi Elton,

You cannot place a user control directly in a RadDockZone - you can only place RadDocks in a zone. One idea would be to place your user control inside the dock and modify the dock's appearance (hide its titlebar, etc.) so that the user only sees the user control and not the dock around it.

Sincerely yours,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Elton
Top achievements
Rank 1
answered on 24 Oct 2007, 11:45 AM
Thank you for reply Petya,

I didn't describe my question clearly.
Acturally I created user controls, each of them is a RadDock. I tried to put them in another RadDock, it looks funny when I drag them.

Currently I put each RadDock in a RadDockZone on my user control. So when I use them I got many zones on a page. And when I drag docks and drop them in one zone, leave other zones empty, there's some empty space which is from empty zones (I set MinSize of Zones 0px already). Just wanna  avoid that empty space.

Is that way ?

Cheers,
Elton
0
Petya
Telerik team
answered on 25 Oct 2007, 02:16 PM
Hello Elton,

Would it be possible for you to provide us with some sample code which we can run to observe your exact settings and the empty space you describe so we can try to better understand the issue and provide a solution. Please, make sure it is a simple running project that includes all fies necessary to be run. To be able to attach files you need to open a support ticket as demonstrated in the attached instructions.

Regards,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sam Bronchetti
Top achievements
Rank 1
answered on 29 Oct 2009, 01:44 PM
I have a similar question:  I have multiple user controls.  Each of the user controls is nothing more than a RadGrid and a hidden field. 
Here is my code to display the control.  I have also included one of the controls below.  The issue is the grid is showing up below the RadDock, not in the rad dock?  Why would that be the case?  Is there something I am failing to do?

 

        <telerik:RadDockLayout ID="docMgr" runat="server" Skin="Web20" EnableViewState="false">  
            <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="100" Orientation="Vertical">  
                <telerik:RadDock ID="dockObjOther" DockMode="Docked" runat="server" Title="Other" DefaultCommands="ExpandCollapse">  
                    <ContentTemplate> 
                        <uc1:Other ID="other" runat="server"  /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="dockObjWorkflow" DockMode="Docked" runat="server" Title="Workflow" DefaultCommands="ExpandCollapse">  
                    <ContentTemplate> 
                        <uc1:workflow ID="workflow"  runat="server" /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="docObjBills" DockMode="Docked" runat="server" Title="Bills">  
                    <ContentTemplate> 
                        <uc1:bills ID="bills" runat="server" /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="docObjTaskMan" DockMode="Docked" runat="server" Title="Task Management" DefaultCommands="ExpandCollapse">  
                    <ContentTemplate> 
                        <uc1:taskman ID="taskman"  runat="server" /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="docObjExpenses" DockMode="Docked" runat="server" Title="Un-Approved Expenses" 
                    DefaultCommands="ExpandCollapse">  
                    <ContentTemplate> 
                        <uc1:expenses ID="expenses" runat="server" /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="docObjCPE" runat="server" DockMode="Docked" Title="Missing CPE" DefaultCommands="ExpandCollapse">  
                    <ContentTemplate> 
                        <uc1:cpe ID="cpe" runat="server" /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="docObjProjEval" runat="server" DockMode="Docked" Title="Project Evaluations" DefaultCommands="ExpandCollapse">  
                    <ContentTemplate> 
                        <uc1:projeval ID="projeval" runat="server" /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
 
 
 
 
<telerik:RadDockLayout ID="docMgr" runat="server" Skin="Web20" EnableViewState="false">  
 
<telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="100" Orientation="Vertical">  
 
<telerik:RadDock ID="dockObjOther" DockMode="Docked" runat="server" Title="Other" DefaultCommands="ExpandCollapse">   
<ContentTemplate>   
 
 
<uc1:Other ID="other" runat="server" />   
 
 
</ContentTemplate>   
 
 
</telerik:RadDock> 
</telerik:RadDockZone>   
 
 
</telerik:RadDockLayout> 
 
User Control:  
<% @ Control Language="VB" AutoEventWireup="false" CodeFile="Other.ascx.vb" Inherits="Other" %>   
 
 
 
 
 <% @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>   
 
 
 <telerik:RadGrid ID="rgOther" runat="server" skinID="defaultGridView" PageSize="5" Width="500px" >   
 
 
 <ExportSettings>   
 
 
 <Pdf PageBottomMargin="" PageFooterMargin="" PageHeaderMargin="" PageHeight="11in" PageLeftMargin="" PageRightMargin="" PageTopMargin="" PageWidth="8.5in" />   
 
 
 
</ExportSettings>   
 
<MasterTableView>   
<NoRecordsTemplate>   
 
 
 
 <span style="font-size: 12px; color: #ff7400"><strong>There are currently no items requiring your attention.  
 
 
 
</strong></span>   
 </NoRecordsTemplate>   
 
 
 <RowIndicatorColumn Visible="False">   
 
 
 <HeaderStyle Width="20px" />   
 
 
 </RowIndicatorColumn>   
 
 
 <ExpandCollapseColumn Visible="False" Resizable="False">   
 
 
 <HeaderStyle Width="20px" />   
 
 
 </ExpandCollapseColumn>   
 
 
 <Columns>   
 
 
 <telerik:GridBoundColumn DataField="Item" HeaderText="Item" ReadOnly="True" SortExpression="Item" UniqueName="Item">   
 
 
 </telerik:GridBoundColumn>   
 
 
   
 
   
 
   
 
 
 
   
   
 
   
 
 
 
<telerik:GridBoundColumn DataField="dueby" datatype="System.DateTime" HeaderText="Due"   
   
 
   
 
   
 
 
 
   
   
 
   
 
 
 
ReadOnly="True" SortExpression="dueby" UniqueName="dueby" AllowFiltering="False">   
   
 
   
 
   
 
 
 
   
   
 
   
 
 
 
</telerik:GridBoundColumn>   
   
 
   
 
   
 
 
 
   
   
 
   
 
 
 
</Columns>   
   
 
   
 
   
 
 
 
   
   
 
   
 
 
 
</MasterTableView>   
   
 
</ 
 
   
 
 
 
telerik:RadGrid>   
   
 
< 
 
   
 
 
 
asp:HiddenField ID="hdnStaffID" runat="server" />   
   
 
 
 
 
 
 
0
Pero
Telerik team
answered on 03 Nov 2009, 07:54 AM
Hello Sam,

I tested the code you have provided and everything is working fine. The RadGrid,as expected, is in the RadDock. Please test the project attached to the thread, and you will see that the grid is shown correctly in the dock.

Can you please send a running project (possibly the project you are working on (at the moment) and experiencing this issue) so we can observe the problem more closely? Please note that, in order to attach files you need to open a support ticket. 


All the best,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sam Bronchetti
Top achievements
Rank 1
answered on 03 Nov 2009, 01:41 PM
I had figured out my problem. Thanks for the response!
Tags
Dock
Asked by
Elton
Top achievements
Rank 1
Answers by
Petya
Telerik team
Elton
Top achievements
Rank 1
Sam Bronchetti
Top achievements
Rank 1
Pero
Telerik team
Share this question
or