No completely working example given

2 posts, 0 answers
  1. Perry
    Perry avatar
    19 posts
    Member since:
    Jan 2008

    Posted 17 Nov 2010 Link to this post


    There doesn't seem to be one fully working barebones demo of confirming a dock close. All of the examples given are for previous versions showing work arounds for bugs that hopefully don't exist anymore or have contrivances in them that make them unusable.

    I want to dynamically add a dock. I want to be able to reorder the docks. I want them to display a confirmation before closing.

    I have tried every combination of the multiple examples given. The best I could do is displaying the confirmation but the dock had already closed.

    This is a major problem with Telerik. There is no authoritative source of barebones examples. The site is polluted with old versions of examples that don't work anymore. There should be a single comprehensive list of examples organized by library version. This library should be indexed and it should be searchable. The need for this is manifested by the frequency with which people ask the same questions over and over again. It isn't because they didn't try to find the answer themselves - I have spent three hours on this so far. It is because there are multiple conflicting inconsistant examples.

    And examples should be barebone. They should show one concept and contain only the minimal set of code that demonstrates the concept. Telerik examples are bloated and confusing because of this.
  2. Pero
    Pero avatar
    1156 posts

    Posted 23 Nov 2010 Link to this post

    Hi Perry,

    You're right. Examples showing how to implement certain scenarios with the RadDock control are missing. We have some in our Code Library, but sample showing how to confirm closing of RadDock is not available.
    For your convenience I have created such project, and here is its full source code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <form id="form1" runat="server">
        <asp:ScriptManager ID="RadScriptManager1" runat="server">
        <script type="text/javascript">
            function OnClientCommand(dock, args)
                if (args.command.get_name() == "CustomClose" && window.confirm('Close dock?'))
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
                <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                    <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px"
                            <telerik:DockCommand CssClass="rdClose" Text="Close" Name="CustomClose" />
                            <telerik:DockExpandCollapseCommand />
                            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. Suspendisse
                            pretium, nulla sit amet porttitor lobortis, ante sapien blandit ante, et tempor
                            magna eros nec sapien. In hac habitasse platea dictumst. Nullam a quam lorem, eu
                            vestibulum turpis. Praesent a neque et diam tincidunt suscipit ut semper massa.
                            Vivamus posuere, mi eu consectetur consequat, libero risus accumsan erat, ut facilisis
                            dolor justo a enim. Donec suscipit tincidunt lorem, sed aliquam velit pulvinar euismod.
                            Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus

    We will upload the code into our Code Library as soon as we can.

    Kind regards,
    the Telerik team
    Browse the vast support resources we have to jumpstart 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.
Back to Top