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

Expand Collapse RadTree Node

2 Answers 17 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Shree
Top achievements
Rank 1
Shree asked on 07 Aug 2014, 12:06 PM
Hi All

when user on mouseover of the +/- icons i need to Expand/Collapse tree nodes at client side.


Thanks
Sree

2 Answers, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 08 Aug 2014, 10:00 AM
Hi,

Please try the following JavaScript code:
var $ = $telerik.$;
 
function pageLoad() {
    var treeView = $find("<%=RadTreeView1.ClientID %>").get_element();
    var rtMinus = $(treeView).find('.rtMinus');
    var rtPlus = $(treeView).find('.rtPlus');
 
    rtMinus.on("mouseover", function myfunction(e) {
        this.click();
    });
 
    rtPlus.on("mouseover", function myfunction(e) {
        this.click();
    });
}

I made you a video, showing how this custom code works at my side.

Hope this would be helpful.

Regards,
Aneliya Petkova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Shree
Top achievements
Rank 1
answered on 11 Aug 2014, 06:38 AM
Thanks for your prompt response Aneliya. The code helped me.

since i am getting script error with rtminus.on i have replce the same with rtminus.mouseover as below.

rtMinus.mouseover(function myfunction(e) {
            this.click();
        });
     
        rtPlus.mouseover(function myfunction(e) {
            this.click();
        });
Tags
TreeView
Asked by
Shree
Top achievements
Rank 1
Answers by
Aneliya Petkova
Telerik team
Shree
Top achievements
Rank 1
Share this question
or