TreeNode and Mouse Events (OnMouseOver/Hoover)

  1. #1

    TreeNode and Mouse Events (OnMouseOver/Hoover)

    Hi,
    I'm using a TreePanel in my application and trying to find a way in which when a user moves or hoovers the mouse over a particular TreeNode a specific (handler, AjaxMethod. ect..) fires. Is there a direct way to do so in Coolite or there is a work around for that? Thanks.
  2. #2

    RE: TreeNode and Mouse Events (OnMouseOver/Hoover)

    Hi again,
    I found this artical on the ExtJS Forum, I don't think its implemented in Coolite. Anyway, maybe somebody could use it. Thanks
  3. #3

    RE: TreeNode and Mouse Events (OnMouseOver/Hoover)

    Hi,

    I need to add an event to fire when I click over a TreeNode. The idea is when I click on a node, it lauched an event for load child nodes of these node by demand.
    I have the idea in html code, but now I need to create these by code.

     
    
    
    <ext:Accordion ID="Accordion1" SkinID="lytLeftSideBar" Animate="true" runat="server">
    
        <ext:TreePanel ID="TreePanel1" SkinID="treeOptions" runat="server" Title="Favorite Options">
            <Root>
                <ext:TreeNode Text="Composers1">
                   <Nodes>
                        <ext:TreeNode Text="Option1"></ext:TreeNode>
                        <ext:TreeNode Text="Option2"></ext:TreeNode>
                        <ext:TreeNode Text="Option3"></ext:TreeNode>
                        <ext:TreeNode Text="Option4"></ext:TreeNode> 
                    </Nodes>
               </ext:TreeNode>
            </Root>
        </ext:TreePanel>
    
    
        <ext:TreePanel ID="TreePanel2" SkinID="treeOptions" runat="server" Title="Products">
            <Root>
                <ext:TreeNode Text="Composers2">
                   <Nodes>
                        <ext:TreeNode Text="Option 5" />
                        <ext:TreeNode Text="Option 6" />
                        <ext:TreeNode Text="Option 7" />
                    </Nodes>
                </ext:TreeNode>
            </Root>
        </ext:TreePanel>
    
    </ext:Accordion>

    But I don't know how to fires an event that load by demand the child nodes (option1, option 2, etc.) when I click over the parent nodes (Composers1 and Composers2).

    I just have the next code, where Menu is an own class that have some properties like:
    int parent; int level; int option; string name; int transactionNumber; string url; string image; string description; string order;


    And the method is:

    
    
    public void ShowMenu(List<Menu> dataMenu)
    {
        List<Menu> menuList = dataMenu;
        if (menuList != null)
          {
            Accordion accordion1 = new Accordion();
            accordion1.ID = "Accordion1";
            accordion1.SkinID = "lytLeftSideBar";
            foreach (Menu item in menuList)
            {
                TreePanel panel = new TreePanel();
                panel.Title = item.Name;
                panel.SkinID = "treeOptions";
                root = new Coolite.Ext.Web.TreeNode("Composers1");
                root.Expanded = false;
                root.AllowChildren = true;
                panel.Root.Add(root);
                accordion1.Items.Add(panel);
            }
            Panel1.BodyControls.Add(accordion1);
        }
    }

Similar Threads

  1. [CLOSED] Button Menu with TextFields, Mouse events interacting
    By FVNoel in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 06, 2013, 9:28 AM
  2. TreeNode Javascript Events
    By markrobotnik in forum 2.x Help
    Replies: 3
    Last Post: Apr 18, 2012, 9:08 AM
  3. Replies: 2
    Last Post: Apr 28, 2011, 1:34 PM
  4. Replies: 15
    Last Post: Feb 03, 2011, 1:27 PM
  5. Replies: 0
    Last Post: Dec 10, 2009, 11:14 AM

Posting Permissions