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

buttons on selected treeview node

1 Answer 104 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Felipe
Top achievements
Rank 1
Felipe asked on 02 Apr 2011, 08:51 PM
Hello,

I have seen the implemented solutioin for this here:

http://www.telerik.com/community/forums/aspnet/treeview/show-image-at-right-side-of-selected-node.aspx

however I have not been able to use this for multiple buttons to the right of the selected treeview node...

I have tried everything to get my code working, and am trying to copy how the radfilter creates the buttons in the rfTool div box...

right now i have the following as a nodetemplate:

<NodeTemplate>
    <div>
    <asp:Label style="display:inline;" />
    <asp:Label style="display:inline;" /></div>
    <div>
    <a id="tnb1" class="tnTool" >firstButton</a>
    <a id="tnb2" class="tnTool" >firstButton</a></div>
</NodeTemplate>

with the following css defined:

.tnTool
{
 background-image: url('/Images/FileExplorerToolbarSprites.png');
 visibility:hidden;
 text-indent:-3333px;
 text-decoration:none;
 float:left;
 white-space:nowrap;
 width:0px;
 height:0px;
}
 
.boolTreeHover .tnTool
{
 display:inline;
 visibility:visible !important;
 width:18px;
 height:18px;
}
 
#tnb1.tnTool:hover {background-position:0 -18px;}
 
#tnb2.tnTool:hover { background-position:0 -36px;}

the class "boolTreeHover " is applied to the "selectedCssClass" property of the node in the code-behind.

the attached image shows what is rendered...

for some reason i *cannot* get the two anchor tags to render inline with the other two labels...

if i put the whole template into one div box, it renders on the same line, but the float:left css renders the buttons BEFORE the labels, rather than after.

any help would be greatly appreciated... thanks!









1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 07 Apr 2011, 11:23 AM
Hi Leland,

Could you, please, set the elements to "position: inline-block"?


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
Tags
TreeView
Asked by
Felipe
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or