ComponentOne WebMenus and WebBars for ASP.NET: WebMenus and WebBars for ASP.NET Task-Based Help > C1WebTreeView Tasks > Creating a Click Event for a Tree Item

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;

}


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