in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Combining aspxTreeList and aspxMenu(template) - unbound - dynamically create menu items

Last post 11/20/2008 5:03 AM by Alexey M (Developer Express). 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 11/11/2008 2:50 PM

    Combining aspxTreeList and aspxMenu(template) - unbound - dynamically create menu items

    Hello,

    I've swarmed the samples and forum and it seems there is no example for what I am attempting to do:

    I need to create a context-sensitive aspxPopupMenu, whose menu-items are populated based on the aspxTreeList node that is clicked. (The tree list does not have check-boxes, it merely hi-lites the node that is clicked)

    For instance:
    If the node represents a folder, then the menu will be populated with folder-specific options ("process contents of this selected folder")
    If the node represents a file, then the menu will be populated with file-specific options ("process this selected file")

    Clicking on the menu-item of the context-sensitive menu should report the node's ID so that I can programmatically (on the server) obtain more information about what the node represents, and act on that information.

    Can someone give me some direction on this?

    Much Appreciated,
    Chris

  • 11/14/2008 1:38 PM In reply to

    Re: Combining aspxTreeList and aspxMenu(template) - unbound - dynamically create menu items

     I found this example in the support center.

    http://www.devexpress.com/Support/Center/e/E145.aspx

    I actually implemented this in a different way, using AJAX to locate the type of node on the server-side, then send it back to a client-side handler, that displayed the menu if it was the proper type of  node. A bit of hop-skip and jump but works fine.

    However, I noticed that this example above as well as in my solution, the X,Y coordinates used to display the menu is off as the tree gets bigger. If you force scrollbars by making the browser window smaller in the above code-sample, the menu does not appear near the mouse. In fact , in some instances, it doesn't appear at all (off-screen).

    anyone know of a fix for this?

     

  • 11/20/2008 5:03 AM In reply to

    Re: Combining aspxTreeList and aspxMenu(template) - unbound - dynamically create menu items

    Hi,

    The mentioned example is outdated.
    As of vol 2008 v1.3 there is a special event -  ClientSideEvents.ContextMenu.
    Please, refer to the docs for details.

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED