ComponentOne WebMenus and WebBars for ASP.NET (2.0) Search HelpCentral 

Creating a Click Event for a Tree Item

To create a click event for a tree item, use the following code:

·      Visual Basic

Protected Sub C1WebTreeView1_ItemClick(ByVal sender As Object, ByVal e As C1.Web.Command.C1WebCommandEventArgs) Handles C1WebTreeView1.ItemClick

        Label1.Text = "You selected " + e.CommandName

End Sub

·      C#

protected void C1WebTreeView1_ItemClick(object sender, C1.Web.Command.C1WebCommandEventArgs e)

{

   Label1.Text = "You selected" + e.CommandName;

}

·      Delphi

procedure C1WebTreeView1_ItemClick(sender: System.Object; e: C1.Web.Command.C1WebCommandEventArgs)

begin

    Label1.Text = 'You selected' + e.CommandName;

end;


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.