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

How to set LoadingStatusPosition for RadTreeView from client side

3 Answers 64 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Puneet Minhas
Top achievements
Rank 1
Puneet Minhas asked on 30 Jun 2010, 12:20 PM
Hi,
Could anyone please tell if it is possible to set the LoadingStatusPosition of a RadTreeView from client-side (using javascript)?

We want to keep the LoadingStatusPosition as 'BeforeNodeText' but in one case, we do not want it to show the loading on node expand and we want to achieve this on ClientContextMenuItemClicked (i.e. expand a node on OnClientContextMenuItemClicked with LoadingStatusPosition as none) .

Thanks & Regards,
Puneet

3 Answers, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 05 Jul 2010, 04:03 PM
Hello Puneet Minhas,

Yes there is such a property - TreeView.set_loadingStatusPosition(indexOfLoadingStatusType) (and of course TreeView.get_loadingStatusPosition());

Here is a page of the help documentation regarding LoadOnDemand properties property: http://www.telerik.com/help/aspnet-ajax/treeview-load-on-demand-2.html

On the server the different positions are represented through enumerations, but on client side you can use integers - 0 for the first one and so on.

Hope this is going to help you!


Regards,
Nikolay Tsenkov
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
mirang
Top achievements
Rank 1
answered on 03 Jan 2012, 01:40 PM
Is there any way, we can customize the loadingstatusposition. I wanted to show the loading animation inplace of the expand button position, so that the text doesn't move and the user is prevented from again expanding the node, untill the childnodes are loaded.
0
Dimitar Terziev
Telerik team
answered on 03 Jan 2012, 02:30 PM
Hi,

The loading message could  be shown in the following positions : below, after and before the node's text or not shown at all. This as my colleague has mentioned is controlled via the LoadingStatusPosition property of the RadTreeView.

As for your request to hide the expand arrow, you could achieve the desired functionality by subscribing to the OnClientNodePopulating and OnClientNodePopulated events. Then when the first one is fired you will hide the arrow as shown below:
function ClientNodePopulating(sender, eventArgs)
      {
 
          var node = eventArgs.get_node();
          var domElement = node.get_element();
 
          $find(".rtPlus", domElement).hide();
      }

After the node is populated and the OnClientNodePopulated is fired you will show the expand/collapse arrow as shown below:
function ClientNodePopulated(sender, eventArgs)
           {
 
               var node = eventArgs.get_node();
               var domElement = node.get_element();
 
               $find(".rtPlus", domElement).show();
           }

Greetings,
Dimitar Terziev
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
Puneet Minhas
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
mirang
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or