server side event of context menu

2 posts, 0 answers
  1. faisal
    faisal avatar
    34 posts
    Member since:
    May 2011

    Posted 04 Jun 2011 Link to this post

    Hi,

    i am working on telrik tree view.

     <telerik:RadTreeView runat="server" ID="RadTreeView1" OnContextMenuItemClick="RadTreeView2_ContextMenuItemClick"  OnClientContextMenuItemClicked="onContextMenuItemClicked"
                                 OnClientNodeClicked="nodeClicked">

    i want to call two functions on contextmenuitemclick i.e clientside and server side. in my case only clientside function is calling. plz guide me how to call the both functions. one more thing that this treeview is inside update Panel.

    Regards,

    Faisal
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Jun 2011 Link to this post

    Hello Faisal,

    I have tried reproducing the issue at my end but no avail. Here is the code that I tried. Please make sure that you have subscribed the server side event correctly.
    aspx:
    <asp:UpdatePanel ID="Update1" runat="server">
        <ContentTemplate>
          <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientContextMenuItemClicked="OnClientContextMenuItemClicked"
               OnContextMenuItemClick="OnContextMenuItemClick">
             <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="menu1">
                        <Items>
                            <telerik:RadMenuItem Text="MoveUp" />
                            <telerik:RadMenuItem Text="MoveDown" />
                             <telerik:RadMenuItem Text="Send E-Mail" />
                        </Items>
                      </telerik:RadTreeViewContextMenu>
                      <telerik:RadTreeViewContextMenu ID="RadTreeViewContextMenu2">
                         <Items>
                              <telerik:RadMenuItem Text="Edit" />
                              <telerik:RadMenuItem Text="Copy" />
                              <telerik:RadMenuItem Text="Delete" />
                         </Items>
                      </telerik:RadTreeViewContextMenu>
             </ContextMenus>
                        <Nodes>
                            <telerik:RadTreeNode Text="People">
                                <Nodes>
                                    <telerik:RadTreeNode Text="Johny" Value="1" ContextMenuID="RadTreeViewContextMenu2" />
                                    <telerik:RadTreeNode Text="Jimmie" Value="2" />
                                    <telerik:RadTreeNode Text="Donie" Value="3" />
                                </Nodes>
                            </telerik:RadTreeNode>
                        </Nodes>
                    </telerik:RadTreeView>
          </ContentTemplate>
    </asp:UpdatePanel>

    Thanks,
    Shinu.
Back to Top