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

RadDock/Zone/Layout in 'disabled mode'

2 Answers 57 Views
Dock
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 09 Feb 2011, 01:35 PM
I've just begun to familiarize myself with the Dock controls to learn if and how they can be of use in my applications.  And, for the most part, I've ignored or discounted them, assuming their use is limited to the very specific, portal-type, personal UI's.  But now I'm revisiting that assumption and wonder if/how they could be of great usefulness if implemented in like-scenario as follows:

Utilize the RadDock controls in their obvious/intended use, to organize and manage site layout, persisting state to xml or db, etc etc.. nothing unusual there.  But- in a non-portal-like, public UI-  limiting that functionality to site owners/administrators only.  The browsing public, or non-auth users, would see the admin-prescribed layout/content, but without any of the the docking chrome or layout functionality. I suppose I think of these as two modes; admin/normal, edit/view, enabled/disabled... etc. 

I've toyed with and have had some success creating custom controls; docks and zones inheriting from RadDock and RadDockZone in order to add some custom properties, override where needed, etc.  I've created and am very happy with the functionality and outcome of the 'admin or enabled' mode and am looking into accomplishing the 'disabled' mode. 

I'm confident I can do this- one (hacky) way or another-  but in order of seeking the most logical, elegant way of doing it--  I would appreciate any input from Telerik or anyone with insight, suggestions, or tips. 

A couple thoughts:
- I thought I could dynamically load docks/content OnInit and then, when not admin, just disable the controls to inhibit rendering the scripts, leaving only chrome to deal with.  Not so. 
- In a 'disabled mode'.. would hope to not render anything dock-related; UI or script, as opposed to disabling, removing or hiding things on the client. 
- Regardless of if/how I can achieve this now.. it seems this kind of functionality could/should be baked-in to the Docking. ??

Thanks a bunch and I appreciate the input!
David



2 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 14 Feb 2011, 10:28 AM
Hi David,

For the time being this scenario can only be achieved through CSS, i.e. on the client only. There is no way to configure the RadDock control to render its content only. I have carefully examined the source code of the RadDock control, to see if there is a way to inherit the RadDock class, and override the rendering, but there isn't. Here is an example showing how to disable/hide parts of the docks:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .rdLeft, .rdRight, .rdTop .rdCenter, .rdBottom .rdCenter
        {
            display: none;
        }
        .RadDockZone
        {
            border: 0px !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="RadScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="300px">
                <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px"
                    DockHandle="None">
                    <ContentTemplate>
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eu leo quis felis eleifend
                        congue id ac nulla. Suspendisse in sapien eu tortor aliquam luctus.
                    </ContentTemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>
            <asp:Panel ID="Panel1" runat="server" Visible="true">
            </asp:Panel>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>

We will consider your suggestion to have the ability to render only the content of the dock, when planning the future releases.

Regards,
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
David
Top achievements
Rank 1
answered on 16 Feb 2011, 06:18 PM
Please do consider implementing in future release of RadDocking.  Like the RadEditor's disabled-mode, being able to render content-only would be a great feature. Consider too that it could be 'toggled' at the Layout, Zone, and Dock levels.

For the time-being, I've decided just to load my content/controls into per-zone placeholders to achieve the non-admin view, rather than hiding on client. 

Thanks for your reply, Pero. 
David
Tags
Dock
Asked by
David
Top achievements
Rank 1
Answers by
Pero
Telerik team
David
Top achievements
Rank 1
Share this question
or