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

[Solved] Change text on Client Node populating

1 Answer 148 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Rizwan
Top achievements
Rank 1
Rizwan asked on 03 Feb 2010, 02:56 PM

 

Hi
  I have a tree where I invoke LoadOnDemand event , My Requirement is to change the Node text to "Loading..." when ajax call is made and then back to orignal text when event completes.  Application works fine with Javascript on IE 8 however it does not work in IE7 where changing the text of node just make the node text blank and on completion set the old text back. This is the javascript

var
oldtext;

 

 

var expanding = false;

 

 

function OnClientNodePopulating(sender, args)

 

{

 

if (expanding == false)

 

{

expanding =

true;

 

oldtext = args.get_node().get_text();

// This line works in IE8 but in IE7 it does run smoothly wihtout any change of text in node
args.get_node().set_text(

"Loading...");

 

}

 

else

 

{

args.set_cancel(

true);

 

}

}

 

function OnClientNodePopulated(sender, args)

 

{

args.get_node().set_text(oldtext);

expanding =

false;

 

}

This is the tree definition

 

 

<telerik:RadTreeView runat="server" ID="tvBrowse" OnNodeExpand="tvBrowse_OnTreeNodePopulate" Height="100%" Width="100%" TriStateCheckBoxes="true" CheckChildNodes="true" CssClass="treeclass" CheckBoxes="true" onclientnodepopulated="OnClientNodePopulated"

 

 

onclientnodepopulating="OnClientNodePopulating">

 

 

 

 

 

 

</telerik:RadTreeView>

 

 

 


Waiting for your adivce.

Best Regards
Rizwan Bashir

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 04 Feb 2010, 10:32 AM
Hi Rizwan,

I've tested this in IE7 and it worked without a problem. I've attached my test page for a reference.

Kind regards,
Yana
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
TreeView
Asked by
Rizwan
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or