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

[Solved] Disabled nodes loaded from web service appear enabled

1 Answer 138 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mick
Top achievements
Rank 1
Mick asked on 03 Jul 2014, 03:13 AM
I'm seeing pretty strange behaviour from the RadTreeView control.  The treeview is load on demand...

                <telerik:RadTreeView ID="tvLocation" runat="server" AllowNodeEditing="False" OnClientNodeClicked="toggleTreeNodeExpansion"
                    OnClientNodeExpanding="toggleTreeNodeExpansion" DataFieldID="ID" DataFieldParentID="Parent" 
                    DataTextField="Name" DataValueField="ID" OnClientLoad="onLocationTreeClientLoad" OnClientNodeChecking="clearRtinTree"
                    Skin="Default" TabIndex="1" CheckBoxes="True" Height="100%" CheckChildNodes="true">
                    <WebServiceSettings Method="LoadLocationTreeNode" />


The toggleTreeNodeExpansion enables disabled nodes to be expanded...

function toggleTreeNodeExpansion(sender, args) {
    var node = args.get_node();
    if (!node.get_enabled()) {
        node.set_enabled(true);
        if (node.get_expanded())
            node.collapse();
        else
            node.expand();
        node.set_enabled(false);
    }
}

The nodes I'm returning nodes from the web service are disabled.  This is what I'm seeing...

http://screencast.com/t/AoStO7vFCbbZ

The first and last nodes loaded have the rtDisabled style however the nodes inbetween do not, until you click on them, after which they do get the style and they appear as disabled.




1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 07 Jul 2014, 01:09 PM
Hello Mick,

The described functionality is quite unusual indeed but I could not replicate it at my side with the code provided. I am attaching my test page. Please review it and let me know what else have to be added to observe the issue.

Would you please elaborate what exactly are you trying to achieve when you click on the node because it is not quite clear from the explanation provided?


Regards,
Plamen
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.

 
Tags
TreeView
Asked by
Mick
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or