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

Problem Unchecking nodes

1 Answer 38 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Tanya
Top achievements
Rank 1
Tanya asked on 09 Sep 2013, 07:16 PM
i have the following piece of code:

 if (lgSentTo.length > 0) {
                        var temp = new Array();
                        // this will return an array with strings "1", "2", etc.
                        temp = lgSentTo.split(",");
                        for (a in temp) {
                            var site = temp[a].toString().trim();
                            GetRadTreeView().findNodeByText(site).disable();
                            GetRadTreeView().findNodeByText(site).checked = false;
                        }
                    }

while "disable()" works fine, i can't seem to uncheck anything.

i've also tried:   GetRadTreeView().findNodeByText(site).uncheck(); but am also getting nowhere. please assist.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Sep 2013, 01:16 PM
Hi Tanya,

Please have a look at the following code I tried to uncheck and disable the nodes.

JavaScript:
<script type="text/javascript">
    function uncheckAndDisable(lgSentTo) {
        var temp = new Array();
        temp = lgSentTo.split(",");
        for (a in temp) {
            var site = temp[a].toString().trim();
            GetRadTreeView().findNodeByText(site).uncheck();
            GetRadTreeView().findNodeByText(site).disable();
        }
    }
    function GetRadTreeView() {
        var radtreeview = $find('<%=RadTreeView1.ClientID %>');
        return radtreeview;
    }
</script>

Thanks,
Shinu.
Tags
TreeView
Asked by
Tanya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or