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

Treeview set_checkable method not working

2 Answers 33 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 1
Hans asked on 15 Oct 2008, 10:03 AM
Folks could someone please elaborate on what exactly the set_checkable node method is supposed to do. It does not seem to work or achieve anything. I have just loaded the latest build 2008.2.1001.20 hoping it would but to no avail.

I wanted to be able to hide or show the node checkbox client side depending on some arbitrary criteria.

To get this to work I had to set the checkable property of all the nodes to true server side. Then using the OnClientLoad event I traverse through all the nodes and as follows.

var treeView = $find("<%=radTreeView_Level.ClientID %>");
            if(treeView)
            {
                var nodeList = treeView.get_allNodes();
                for(var i=0; i < nodeList.length; i++)
                {
                    var node = nodeList[i];
                    if(node && node.get_level() > 0)
                    {
                        var chkbox = node.get_checkBoxElement();
                        if(node.get_checked())
                        {
                            chkbox.className = "rtChk";
                        }
                        else
                        {
                            chkbox.className = "hidden";
                        }
                    }
                }
            }

This works fine but seems to be a hack considering theres a set_checkable method that probably should do this for me.

Tks H





2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 17 Oct 2008, 01:25 PM
Hello Hans,

Currently this method is not implemented. I have logged it in our ToDo list and the method will work in the future versions of the controls.

I have updated your Telerik Points for finding this problem.

Best wishes,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nate
Top achievements
Rank 1
answered on 19 Oct 2008, 09:57 PM
Wow, are you serious?  Why is it in your docs at all then?  I hope there aren't a lot of others out there like me -- on a tight deadline and wasting time with methods that aren't even working, yet are documented. 

I thought Radtools was supposed to help speed up the development process, yet I have ran into several dead-ends and wasted a ton of time trying to hunt down syntax in your documentation. 

Tags
TreeView
Asked by
Hans
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Nate
Top achievements
Rank 1
Share this question
or