buttons on selected treeview node

2 posts, 0 answers
  1. Felipe
    Felipe avatar
    33 posts
    Member since:
    Dec 2010

    Posted 02 Apr 2011 Link to this post

    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!









  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 07 Apr 2011 Link to this post

    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
Back to Top