This is a migrated thread and some comments may be shown as answers.

OnClientNodeExpanding not working in RadTreeView

5 Answers 116 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Abhishek
Top achievements
Rank 1
Abhishek asked on 17 Jun 2010, 09:59 AM
Hi,

I have a RadTreeView in a web page. I want to handle the event when '+' is clicked to expand a node.
When I try to handle it on server side it works fine.
But when I try to handle this event in JavaScript using OnClientNodeExpanding it does not work.
Please help.

Regards,
Abhishek Jain

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Jun 2010, 11:22 AM
Hello Abhishek,

Have you tried correct method to attach the OnClientNodeExpanding event, that is without including brackets with handler name?

Check out the example:
aspx:
 
<telerik:RadTreeView ID="RadTreeView1" OnClientNodeExpanding="OnClientNodeExpanding" 
     runat="server" CheckBoxes="True" ShowLineImages="False"
   . . . 

client code:
 
<script language="javascript" type="text/javascript"
    function OnClientNodeExpanding(sender, args) { 
        alert("OnClientNodeExpanding fired"); 
    } 
</script> 

Could you paste the code that you tried?

-Shinu.
0
Abhishek
Top achievements
Rank 1
answered on 17 Jun 2010, 11:37 AM
Hi,

aspx
<radT:RadTreeView ID="RadTreeView1" TabIndex="1" runat="server" Skin="Web20" OnClientNodeExpanding="nodeExpanding" > 

clien code
<script language="javascript" type="text/javascript">    
    function nodeExpanding(sender, args) {    
        alert("Node is expanding");    
    }    
</script>   

i can't find a problem with the way code has been written.
But it does not work.
0
Yana
Telerik team
answered on 17 Jun 2010, 12:10 PM
Hi Abhishek,

Which control exactly you're using - RadTreeView for ASP.NET or RadTreeView for ASP.NET AJAX?

All the best,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Abhishek
Top achievements
Rank 1
answered on 17 Jun 2010, 12:29 PM
Hi,

I'm using  RadTreeView for ASP.NET AJAX.

Regards,
Abhishek Jain
0
Yana
Telerik team
answered on 18 Jun 2010, 12:35 PM
Hello Abhishek,

I've tested the event again and it's fired without a problem. Please send us a simple page where the erroneous behavior occurs. Thanks

Regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Abhishek
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Abhishek
Top achievements
Rank 1
Yana
Telerik team
Share this question
or