Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6883639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:24:29+00:00 2026-05-27T05:24:29+00:00

I have a treeview on my ASP.Net page and for some reason the text

  • 0

I have a treeview on my ASP.Net page and for some reason the text on some nodes gets cut off, I am programatically adding all the nodes and am aware of the existing issue listed here: http://support.microsoft.com/?scid=kb%3Ben-us%3B937215&x=8&y=13 however I am not changing the font and as you see in the code below this fix does not work for me.

 Private Sub populateTreeView()

'Code that gets the data is here

      Dim ParentIds As List(Of Integer) = New List(Of Integer)

      For Each row As DataRow In ds.Rows

         If ParentIds.Contains(row("ParentID")) Then
            '' Do Nothing 
         Else
            ParentIds.Add(row("ParentID"))
         End If
      Next

      For Each Parent As Integer In ParentIds
         Dim parentNode As New System.Web.UI.WebControls.TreeNode

         For Each child In ds.Rows
            If (child("ParentID") = Parent) Then

               Dim childNode As New System.Web.UI.WebControls.TreeNode

               parentNode.Text = child("ParentDescription")
               parentNode.Value = child("ParentID")
               parentNode.Expanded = False

               childNode.Text = child("ChildDescription")
               childNode.Value = child("ChildID")


               parentNode.SelectAction = TreeNodeSelectAction.None
               parentNode.ChildNodes.Add(childNode)
            End If
         Next
         trvItem.Nodes.Add(parentNode)
      Next

      'This is just added to test the MS fix
      trvItem.Nodes(0).Text += String.Empty
   End Sub

The strange thing is that this issue only appears in IE, I have tested it in chrome and Firefox and both browsers display the text perfectly.

When I select a node this fixes the problem and all text displays as normal.

Any ideas as to what is going wrong here would be great as I’m clueless right now.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:24:30+00:00Added an answer on May 27, 2026 at 5:24 am

    Marking this as closed since I never received an answer which solved the problem.

    I managed to work around it by using the javascript postback to select one of the items on load, thus forcing the text to display correctly. I think this is an extension of the bug I linked in my original question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I using TreeView with ShowCheckBoxes=All in an ASP.NET 3.5 web application and for some
I do have a asp:TreeView control on my Asp.net page and when I render
I have created a TreeView in asp.net page and also set the height and
I have an asp.net page that needs to populate a treeview based on a
I've used the following js code to expand/collapse all nodes of an ASP.Net TreeView
I have a ASP.Net TreeView Control with Checkboxes along Child nodes. I want to
I have a requirement to create a multi level treeview in ASP.Net (with VB)
I have a ASP.Net TreeView control that I am binding to an XML data
I am trying to create a treeview dynamically using c# and asp.net. I have
I have listed data for ASP.net control TreeView. I wanted to disable a particular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.