VB.Net - RadDock DockHandle attribute not taking effect (Telerik)

92 views Asked by At

I'm trying to build a simple program that allows me to move panels to different areas on-screen using Telerik's RadDock library.

I have tried to follow this online example as much as possible, but for some reason, the process of being able to grab and drag the panels doesn't take effect at all in my program, despite the attribute list being copied almost exactly.

I've set the DockHandle property differently for each RadDock element, but none of these are working at all.

The code is shown below:

    <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
        <table>
            <tr>
                <td>
                    <telerik:RadDockZone runat="server" ID="RadDockZone1" MinHeight="200px" Width="200px">
                        <telerik:RadDock runat="server" ID="Dock1" Title="RadDock1" DockHandle="None"
                            Text="No DockHandle. Cannot be dragged." Width="200px" 
                            EnableEmbeddedSkins="False" Skin="Blue">
                            <ContentTemplate>
                                <asp:PlaceHolder ID="ph1" runat="server"></asp:PlaceHolder>
                            </ContentTemplate></telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
                <td>
                    <telerik:RadDockZone runat="server" ID="RadDockZone2" MinHeight="200px" Width="200px">
                        <telerik:RadDock runat="server" ID="Dock2" Title="RadDock2" DockHandle="Grip"
                            Text="Grip DockHandle. Drag by Top." Width="200px" 
                            EnableEmbeddedSkins="False" Skin="Blue">
                            <ContentTemplate>
                                <asp:PlaceHolder ID="ph2" runat="server"></asp:PlaceHolder>
                            </ContentTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
                <td>
                    <telerik:RadDockZone runat="server" ID="RadDockZone3" MinHeight="200px" Width="200px">
                        <telerik:RadDock runat="server" ID="Dock3" Title="RadDock3" DockHandle="TitleBar"
                            Text="TitleBar DockHandle. Drag by TitleBar." Width="200px" 
                            EnableEmbeddedSkins="False" Skin="Blue">
                            <ContentTemplate>
                                <asp:PlaceHolder ID="ph4" runat="server"></asp:PlaceHolder>
                            </ContentTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
            </tr>
        </table>
    </telerik:RadDockLayout>

The page loads, but the two RadDocks that should be draggable cannot be moved at all, despite the DockHandle being set explicitly in the HTML.

Does anyone have any idea why this might be?

UPDATE

I have added a 4th RadDockZone and RadDock that contains a RadioButtonList. I have written a SelectedIndexChanged event for this list and linked it in the HTML, but the event never fires.

                <td>
                    <telerik:RadDockZone runat="server" ID="RadDockZone4" MinHeight="200px" Width="200px">
                        <telerik:RadDock runat="server" ID="Dock4" Title="RadDock4" DockHandle="None" Width="200px" 
                            EnableEmbeddedSkins="False" Skin="Blue">
                            <ContentTemplate>
                                <div>
                                    Pick a skin for the RadDocks...
                                    <br />
                                    <asp:RadioButtonList runat="server" ID="radSkins" OnSelectedIndexChanged="skin_Selected">
                                        <asp:ListItem Text="Black Skin" Value="Black" Selected="True"></asp:ListItem>
                                        <asp:ListItem Text="Blue Skin" Value="Blue"></asp:ListItem>
                                        <asp:ListItem Text="White Skin" Value="White"></asp:ListItem>
                                    </asp:RadioButtonList>
                                </div>
                            </ContentTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>

This leads me to think there is something more fundamental causing the RadDocks not to interact, as the selection from the RadioButtonList is possible but does not trigger the event. It seems at this point that nothing on the actual rendered webpage is responding.

Thanks, Mark

1

There are 1 answers

0
woodykiddy On
<telerik:RadDockZone runat="server" ID="RadDockZone7" MinHeight="200px" Width="200px">
        <telerik:RadDock runat="server" ID="Dock4" Title="RadDock4" DockHandle="None" Width="200px"
            EnableEmbeddedSkins="False" Skin="Blue">
            <ContentTemplate>
                <div>
                    Pick a skin for the RadDocks...<br />
                    <asp:RadioButtonList runat="server" ID="RadioButtonList1" OnSelectedIndexChanged="skin_Selected" AutoPostBack="True">
                        <asp:ListItem Text="Black Skin" Value="Black" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="Blue Skin" Value="Blue"></asp:ListItem>
                        <asp:ListItem Text="White Skin" Value="White"></asp:ListItem>
                    </asp:RadioButtonList>
                </div>
            </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>

SelectedIndexChanged didn't get triggered was because you forgot to set AutoPostBack = "true". Once it's set, you should be able to execute the code in the SelectedIndexChanged event.

As for the issue with dock handle, I don't think there's any problem there at all from my try. I was able to apply three types to the RadDock control and they worked the way as expected. Grip/TitleBar did allow RadDock control to be draggable. So what exactly did you mean by "not working"? Were there any client side errors that perhaps could cause the control not to function well.

RadDock Dock Handle Demo: http://demos.telerik.com/aspnet-ajax/dock/examples/dockhandle/defaultcs.aspx