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

DockCommand - Cannot Add Custom Commands

1 Answer 86 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Scott Nolen
Top achievements
Rank 1
Scott Nolen asked on 17 Mar 2010, 03:46 PM
Please help

I am using the eval version 2009.3.1208.35 of the RadDock control and attempting to add a custom command. I have created the custom command by typing the information in the code(below is the code). The designer gives me this error -
Error Creating Control - telerik:dockcommand
No 'runat=server' attribute present on the
dockcommand tag.

code to register it:

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

javascript code block:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

<script type="text/javascript">

 

 

 

function OnClientCommand(dock, args) {

 

 

 $find(

 

 

"<%=RadDockZone1.ClientID %>").dock(dock);

 }

 

</script>

 

 

 

</telerik:RadCodeBlock>

 

 

 

code to add command:
 <div id="divRadDocks" runat="server" style="border-style:none; left:620px; top:65px; width:520px; position: absolute; background-color: #FFFFFF;">

 

 

 

<telerik:RadDockLayout runat="server" ID="RadDockLayout1"

 

 

 

StoreLayoutInViewState="True" >

 

 

 

<telerik:RadDockZone runat="server" ID="RadDockZone1" Style="float: left;

 

 

 

background: #f5f4e8;" Width="250px" MinHeight="400px" FitDocks="True">

 

 

 

<telerik:RadDock runat="server" ID="RadDock1" Width="250px"

 

 

 

Title="Bill History" DefaultCommands="ExpandCollapse" Resizable="True">

 

 

 

<ContentTemplate>

 

 

 

<div id="divbillhistory">

 

 

 

</div>

 

 

 

</ContentTemplate>

 

 

 

</telerik:RadDock>

 

 

 

<telerik:RadDock runat="server" ID="RadDock2" Title="Pickup Information"

 

 

 

DefaultCommands="ExpandCollapse" Width="250px" Resizable="True">

 

 

 

<Commands>

 

 

 

<telerik:DockCommand Name="Test Command" AutoPostBack="false" OnClientCommand="OnClientCommand" />

 

 

 

</Commands>

 

 

 

<ContentTemplate>

 

 

 

<div id="divInlandPickupInfo" style="width:250px; color: Black; font:Arial; font-weight:normal; font-size:8pt;">

 

 

 

<table style="width:100%">

 

 

 

<tr style="width:100%">

 

 

 

<td >

 

 

 

Quote #:

 

 

</td>

 

 

 

<td>

 

 

 

<input id="TextQuoteNumber" type="text" />

 

 

 

</td>

 

 

 

<td >

 

 

 

Pro #:

 

 

</td>

 

 

 

<td>

 

 

 

<input id="TextProNumber" type="text" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

</ContentTemplate>

 

 

 

</telerik:RadDock>

 

 

 

</telerik:RadDockZone>

 

 

 

<telerik:RadDockZone runat="server" ID="RadDockZone3" Style="float: right; background: #fff3c8;"

 

 

 

Width="250px" MinHeight="400px" FitDocks="True">

 

 

 

<telerik:RadDock runat="server" ID="RadDock4" Width="250px"

 

 

 

Title="ContentContainer" DefaultCommands="ExpandCollapse" Resizable="True">

 

 

 

</telerik:RadDock>

 

 

 

</telerik:RadDockZone>

 

 

 

</telerik:RadDockLayout>

 

 

 

<table style="width:100%">

 

 

 

<tr style="width:100%">

 

 

 

<td style="width:100px">

 

 

 

<input id="Button1" visible="true" type="button" value="Undock" onclick="undockinland()" />

 

 

 

</td>

 

 

 

<td style="width:100px">

 

 

 

<input id="Button2" visible="false" type="button" value="Show" onclick="radshowheightwidth()" />

 

 

 

</td>

 

 

 

<td style="width:100px">

 

 

 

<input id="Button3" visible="false" type="button" value="Dock" onclick="dockinland()" />

 

 

 

</td>

 

 

 

<td id="TESTRADOCKCLICK" runat="server">

 

 

 

&nbsp

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 22 Mar 2010, 03:59 PM
Hi Scott,

We know about this problem and it will be fixed for some of the future releases. This occurs at design time only, and does not affect the run-time behavior of the control. If you run the application you will notice that everything is OK. Here is the full source code of the project I tested:

.aspx
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
        <script type="text/javascript">
            function OnClientCommand(dock, args)
            {
                $find("<%=RadDockZone1.ClientID %>").dock(dock);
            }
        </script>
 
    </telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        </Scripts>
    </asp:ScriptManager>
    <div>
        <div id="divRadDocks" runat="server" style="border-style: none; left: 620px; top: 65px;
            width: 520px; position: absolute; background-color: #FFFFFF;">
            <telerik:RadDockLayout runat="server" ID="RadDockLayout1" StoreLayoutInViewState="True">
                <telerik:RadDockZone runat="server" ID="RadDockZone1" Style="float: left; background: #f5f4e8;"
                    Width="250px" MinHeight="400px" FitDocks="True">
                    <telerik:RadDock runat="server" ID="RadDock1" Width="250px" Title="Bill History"
                        DefaultCommands="ExpandCollapse" Resizable="True">
                        <ContentTemplate>
                            <div id="divbillhistory">
                            </div>
                        </ContentTemplate>
                    </telerik:RadDock>
                    <telerik:RadDock runat="server" ID="RadDock2" Title="Pickup Information" DefaultCommands="ExpandCollapse"
                        Width="250px" Resizable="True">
                        <Commands>
                            <telerik:DockCommand Name="Test Command" AutoPostBack="false" OnClientCommand="OnClientCommand" />
                        </Commands>
                        <ContentTemplate>
                            <div id="divInlandPickupInfo" style="width: 250px; color: Black; font: Arial; font-weight: normal;
                                font-size: 8pt;">
                                <table style="width: 100%">
                                    <tr style="width: 100%">
                                        <td>
                                            Quote #:
                                        </td>
                                        <td>
                                            <input id="TextQuoteNumber" type="text" />
                                        </td>
                                        <td>
                                            Pro #:
                                        </td>
                                        <td>
                                            <input id="TextProNumber" type="text" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ContentTemplate>
                    </telerik:RadDock>
                </telerik:RadDockZone>
                <telerik:RadDockZone runat="server" ID="RadDockZone2" Style="float: right; background: #fff3c8;"
                    Width="250px" MinHeight="400px" FitDocks="True">
                    <telerik:RadDock runat="server" ID="RadDock3" Width="250px" Title="ContentContainer"
                        DefaultCommands="ExpandCollapse" Resizable="True">
                    </telerik:RadDock>
                </telerik:RadDockZone>
            </telerik:RadDockLayout>
            <table style="width: 100%">
                <tr style="width: 100%">
                    <td style="width: 100px">
                        <input id="Button1" visible="true" type="button" value="Undock" onclick="undockinland()" />
                    </td>
                    <td style="width: 100px">
                        <input id="Button2" visible="false" type="button" value="Show" onclick="radshowheightwidth()" />
                    </td>
                    <td style="width: 100px">
                        <input id="Button3" visible="false" type="button" value="Dock" onclick="dockinland()" />
                    </td>
                    <td id="TESTRADOCKCLICK" runat="server">
                         
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>



All the best,
Pero
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Dock
Asked by
Scott Nolen
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or