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

Node text blurry/shadowed in disabled treeview

1 Answer 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert Koska
Top achievements
Rank 1
Robert Koska asked on 08 Feb 2012, 10:55 PM
I'm not sure if this is something in our CSS that's causing this or not...

If I set my treeview to disabled, the nodes seem to be a gray color, but have a white shadow. I've attached a picture of what I'm seeing. it's easier to see the "shadow" on the selected node, but it is visible on the non selected nodes too. Any idea what's causing this?

On a tangent, is there any way to prevent the user from selecting different nodes and collapsing nodes other than just totally disabling the entire treeview?

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 09 Feb 2012, 02:41 PM
Hi Robert,

With a normal RadTreeView without any styles added to it, this behavior doesn't occur. Perhaps you are using a skin, theme or templates in your treeview, which is the reason for this appearance.

As for your second question, you can determine whether a user can select a node using the OnClientNodeClicking event. The handler function for this event receives two parameters: the TreeView and an EventArgs argument. If you set eventArgs.set_cancel(true), you basically cancel the click. Here's the full function:
function clientNodeClicking(sender, args) {
    var node = args.get_node();
    if ("//some condition") {
        args.set_cancel(true);
    }
}

The same can be done for expanding and collapsing: you just use the OnClientNodeExpanding and OnClientNodeCollapsing functions. In both functions you again have args.set_cancel available to cancel the action.
 
Kind regards,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
TreeView
Asked by
Robert Koska
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or