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

Node loading animation - start stop

3 Answers 48 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
richard
Top achievements
Rank 1
richard asked on 06 Jan 2012, 10:45 PM
Hello there,

I am using the radTreeView client side click on  a node.

Please can you tell me if there a way I can start and stop the node loading animation via javascript?

Many thanks


3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 10 Jan 2012, 09:59 AM
Hello Richard,

 
You can use the following code in the onClientNodeClicked client-side event:
 

function OnClientNodeClicked(sender, args) {
           alert(  sender.get_expandAnimation().get_type());
           sender.trackChanges();
           var expandAnimationType = Telerik.Web.UI.AnimationType.parse("InQuart");
           sender.get_expandAnimation().set_type(expandAnimationType);
           sender.commitChanges();
       }

You can also refer to Expand Animation demo for more information.

Hope this will help.

Regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
richard
Top achievements
Rank 1
answered on 10 Jan 2012, 11:19 AM
Hello Plamen,

many thanks for your reply.

I am looking to switch on/off the populate on demand ''busy icon" that apears in the node when the tree is fetching data, rather than the expand and collapse animation style.

I am sorry if my explanation was not very clear.

Hope you can still help me!

Richard
0
Plamen
Telerik team
answered on 11 Jan 2012, 02:34 PM
Hi Richard,

You can set the loadingPositionStatus to None as in the code:

function OnClientClicked(sneder, args) {
 
               var tree = $find("<%= RadTreeView2.ClientID %>");
               alert(tree.get_loadingStatusPosition());
               tree.trackChanges();
               tree.set_loadingStatusPosition(Telerik.Web.UI.TreeViewLoadingStatusPosition.None);
               tree.commitChanges();
           }
 

Hope this helps.


Kind regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeView
Asked by
richard
Top achievements
Rank 1
Answers by
Plamen
Telerik team
richard
Top achievements
Rank 1
Share this question
or