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

Highlight the full row of a node

3 Answers 162 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Eugen
Top achievements
Rank 1
Eugen asked on 13 Sep 2010, 03:32 PM

Hi everyone,

Is there a way to highlight the "full row" of a node? I mean the highlighted node background to fit the entire control width.

The default mode is note text length dependent.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 14 Sep 2010, 07:32 AM
Hello Eugen,

Yes, there is!
Here is how you can do that:
// highlight the first node in the rootNodesCollection
var $ = $telerik.$;
var tree = $find("RadTreeView1");
var nodeElement = tree.get_nodes().getNode(0).get_element();
var nodeRow = $('> div', nodeElement);
$(nodeRow).css("background-color", "yellow");

Hope this is helpful for you!


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eugen
Top achievements
Rank 1
answered on 01 Dec 2010, 08:26 AM
Thank you Nikolay for your replay but unfortunately this is not what I want. I want to set the background (image/color) for any child node to spread on the entire tree width. Your JS approach only spread the background element over the "bullet" zone (additional to text zone) of the node (<LI> element)
0
Nikolay Tsenkov
Telerik team
answered on 03 Dec 2010, 01:10 PM
Hi Eugen,

Well, this is not so trivial to be achieved. My suggestion is to use the RadTreeList that we have recently introduced. There all the elements are having the same width and at the same time you still get the treeView's hierarchical capabilities.


Regards,
Nikolay Tsenkov
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
TreeView
Asked by
Eugen
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Eugen
Top achievements
Rank 1
Share this question
or