Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
804
Maybe Stupid, but I'm tired!!
posted

Why this method is never called when I clicked on a node of my ultraWebTree1

protected void UltraWebTree1_NodeSelectionChanged(object sender, WebTreeNodeEventArgs e)
{
      e.Node........;
}

 

I know it is easy, but I'm lost thanks you

 

Gabriel Deschênes

Parents
  • 28407
    posted

    HI,

     There is a WebTree Property called Selectable - If this is set to false, then no nodes can be selected and the NodeSelectionChanged event will not fire.

    Here is a help link:

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Infragistics2.WebUI.UltraWebNavigator.v8.3~Infragistics.WebUI.UltraWebNavigator.UltraWebTree~Selectable.html

     Another possibility would be if you are using Manual LoadOnDemand.

     Here is a sample program i created  that shows the NodeSelectionchanged event will fire if it is properly wired up.

     Here is my code behind:

    using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;

    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void UltraWebTree1_NodeClicked(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
        {
            Label1.Text = "clicked " + e.Node.Text;
        }
        protected void UltraWebTree1_NodeSelectionChanged(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
        {
            Label2.Text = "selected " + e.Node.Text;
        }
    }

     

    Here is the Aspx:

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%@ Register assembly="Infragistics2.WebUI.UltraWebNavigator.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebNavigator" tagprefix="ignav" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
            <ignav:UltraWebTree ID="UltraWebTree1" runat="server" DefaultImage=""
                HiliteClass="" HoverClass="" Indentation="20"
                onnodeclicked="UltraWebTree1_NodeClicked"
                onnodeselectionchanged="UltraWebTree1_NodeSelectionChanged">
                <Levels>
                    <ignav:Level Index="0" />
                </Levels>
                <Nodes>
                    <ignav:Node Text="Root Node">
                        <Nodes>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                        </Nodes>
                    </ignav:Node>
                    <ignav:Node Text="Root Node">
                        <Nodes>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                        </Nodes>
                    </ignav:Node>
                </Nodes>
            </ignav:UltraWebTree>
       
        </div>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        </form>
    </body>
    </html>

Reply Children