I have a problem with my radTreeView with sharepoint. I would like to put an event on the click of the treeview.
I tried to put in my aspx code :
<script runat="server">
protected void RadTreeView1_NodeClick(object o, RadTreeNodeEventArgs e)
{
Label1.Text = TreeView1.SelectedNode.Value.ToString();
}
</script>
(I put AutoEventWireup="true" )
but when i click on an item of my treeview, my application doesn't execute this function.
I tried also to put the function
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
Label1.Text = TreeView1.SelectedNode.Value.ToString();
}
in my aspx.cs code and I also put :
protected override void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.RadTreeView1.NodeClick += new Telerik.WebControls.RadTreeView.RadTreeViewEventHandler(this.RadTreeView1_NodeClick);
}
But when I execute my application this function doesn't work, it's not executed.
In the both cases, when I click, my application is redirected to the URL of the node. I would like the function TreeView1_SelectedNodeChanged is executed before the redirection.
Thank you for your help