RadDock/Zone/Layout in 'disabled mode'

3 posts, 0 answers
  1. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 09 Feb 2011 Link to this post

    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. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 14 Feb 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    57 posts
    Member since:
    Nov 2004

    Posted 16 Feb 2011 Link to this post

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