using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using APNSoft.WebControls;
public partial class TreeView_ServerSelection : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Apply event-handling method
myTreeView.OnItemClick += new APNSoft.WebControls.TreeViewEventHandler(myTreeView_OnItemClick);
}
void myTreeView_OnItemClick(object sender, APNSoft.WebControls.TreeViewEventArgs e)
{
//Get component instance
APNSoftTreeView myTreeView = (APNSoftTreeView)sender;
//Get clicked Item
TreeViewElement myItem = e.TreeViewElement;
//Display clicked item data
string ClickedItem = "";
ClickedItem += "Component ID: <b>" + myTreeView.ID + "</b>";
ClickedItem += "<br/>Item ID: <b>" + myItem.id + "</b>";
ClickedItem += "<br/>Item title: <b>" + myItem.title + "</b><br/><br/>";
lblClickedItem.Text = ClickedItem;
}
}
|