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

tree context menu in sliding pane

3 Answers 130 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Mohammad
Top achievements
Rank 1
Mohammad asked on 11 Dec 2013, 05:47 AM
dear telerik,
i have a situation like following:

  <telerik:RadSplitter EnableAjaxSkinRendering="true" Skin="Office2007"  ID="uxSplitter" runat="server" Width="100%" Height="100%" >
          <telerik:RadPane ID="uxLeftArea" runat="server" Width="22px" Scrolling="none" Height="100%">
               <telerik:RadSlidingZone ClickToOpen="true" ID="uxLeftSlidingZone" runat="server" Width="22px" Height="100px">
                    <telerik:RadSlidingPane    ID="uxOCPane" Title="Organization Chart" runat="server" Width="200px" MinWidth="200">
                        <telerik:RadTreeView Skin="Office2007"  ID="uxOrganizationUnitTree" EnableDragAndDrop="True" MultipleSelect="false"  TabIndex="1" runat="server">
                            <ContextMenus>
                             <telerik:RadTreeViewContextMenu ID="uxOrganizationUnitCtxtMnu" runat="server">
                                <Items>
                                        <telerik:RadMenuItem Value="AddChild" Text="Add Child Unit ...">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem Value="Delete" Text="Delete Unit ...">
                                        </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadTreeViewContextMenu>
                            </ContextMenus>
                        </telerik:RadTreeView>
                        </telerik:RadSlidingPane>
                   </telerik:RadSlidingZone>
              </telerik:RadPane>
</telerik:RadSplitter>


i have a tree with context menu placed in a context pane, when i right click on the tree the context menu appears like the attached image.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Dec 2013, 06:58 AM
Hi Mohammad,

Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code which works fine at my end.

ASPX:
<telerik:RadSplitter EnableAjaxSkinRendering="true" Skin="Office2007" ID="uxSplitter"
    runat="server" Width="100%" Height="100%">
    <telerik:RadPane ID="uxLeftArea" runat="server" Width="22px" Scrolling="none" Height="100%">
        <telerik:RadSlidingZone ClickToOpen="true" ID="uxLeftSlidingZone" runat="server"
            Width="22px" Height="100px">
            <telerik:RadSlidingPane ID="uxOCPane" Title="Organization Chart" runat="server" Width="200px"
                MinWidth="200">
                <telerik:RadTreeView Skin="Office2007" ID="uxOrganizationUnitTree" EnableDragAndDrop="True"
                    MultipleSelect="false" TabIndex="1" runat="server">
                    <ContextMenus>
                        <telerik:RadTreeViewContextMenu ID="uxOrganizationUnitCtxtMnu" runat="server">
                            <Items>
                                <telerik:RadMenuItem Value="AddChild" Text="Add Child Unit ...">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Value="Delete" Text="Delete Unit ...">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Value="AddChild" Text="Add Child Unit ...">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Value="Delete" Text="Delete Unit ...">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Value="AddChild" Text="Add Child Unit ...">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Value="Delete" Text="Delete Unit ...">
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadTreeViewContextMenu>
                    </ContextMenus>
                    <Nodes>
                        <telerik:RadTreeNode runat="server" Text="one" ContextMenuID="uxOrganizationUnitCtxtMnu">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="one1.1" ContextMenuID="uxOrganizationUnitCtxtMnu">
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="one1.2" ContextMenuID="uxOrganizationUnitCtxtMnu">
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Two" ContextMenuID="uxOrganizationUnitCtxtMnu">
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Three" ContextMenuID="uxOrganizationUnitCtxtMnu">
                        </telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeView>
            </telerik:RadSlidingPane>
        </telerik:RadSlidingZone>
    </telerik:RadPane>
</telerik:RadSplitter>

Please provide your full code if it doesn't help.
Thanks,
Shinu.
0
Mohammad
Top achievements
Rank 1
answered on 16 Dec 2013, 01:10 PM
sorry i forgot to mention that my page has direction (rtl) kindly try in this case the context menu appears incomplete in this state,
try on your example to make the body direction (rtl) this will simulate my case,
thank you for your help and interest
0
Boyan Dimitrov
Telerik team
answered on 19 Dec 2013, 11:53 AM
Hello,

Please find a sample project that implements right to left direction for the RadSplitter, RadTreeView and the context menu. Please note that this is our recommended way of achieving such scenario so you can use that approach in your project.


Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Menu
Asked by
Mohammad
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mohammad
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or