I have an ASP.NET TreeView and need set ShowLine “true” when I define its style.
However, the treeview’s lines will be cut-off.
I tried this tutorial, but it didn’t help.
.tree
{
font-size: 40px;
height: 40px !important;
}
<asp:TreeView ID="TreeView1" runat="server" ShowLines="True" CssClass="tree">
<Nodes>
<asp:TreeNode Text="test1" Value="1">
<asp:TreeNode Text="test1.1" Value="11"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="test2" Value="2">
<asp:TreeNode Text="test2.1" Value="21"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
Did you try the styles mentioned in the example itself? you are missing
td divin the styleThat will work. Note that setting 40px is not going to work directly as it seems the vertical line image used within the div is of 20px height; hence you will need to implement your own ways if you want to change that. This would also affect the expand/collapse icon on the tree nodes.
EDIT
The default images used are 20 x 20 pixels in size. to set your own set of images, you need to set
LineImagesFolderproperty of the tree view (by doing this you will be providing your own set of images). Have a look at this MSDN Link