New nodes are blank

3 posts, 0 answers
  1. Richard
    Richard avatar
    5 posts
    Member since:
    Jun 2017

    Posted 16 Jun 2017 Link to this post

    Hi there,

    I'm trying to add nodes to a specific node in a previously databound radtreeview.  

    When the page updates, the correct number of nodes are visible in the correct parent node, but they have no text.


                    Dim current_version_node As RadTreeNode = rtvClientSpecs.FindNode(Function(x) x.FullPath = e.CommandArgument.ToString())
                    If current_version_node.Nodes.Count = 0 Then

                        f = oclientContext.Web.GetFileByServerRelativeUrl("/" + e.CommandArgument.ToString())

                        For Each _version As FileVersion In f.Versions
                            If Not _version.IsCurrentVersion Then
                                Dim old_version_node As New RadTreeNode(e.CommandArgument.ToString() + "/" + String.Format("Version {0}", _version.VersionLabel))
                                old_version_node.Value = _version.VersionLabel
                            End If
                        current_version_node.Expanded = Not current_version_node.Expanded
                    End If
  2. Richard
    Richard avatar
    5 posts
    Member since:
    Jun 2017

    Posted 19 Jun 2017 in reply to Richard Link to this post

    Some followup details:

    When I step through the code, current_verison_node.Nodes contains the nodes to be added with all the correct values - including Text and Value.  It's just not displaying anything to the page except the empty nodes.

  3. Richard
    Richard avatar
    5 posts
    Member since:
    Jun 2017

    Posted 21 Jun 2017 Link to this post

    Nevermind, thanks anyway (for nothing - 4 days and no response, really?).

    I will still share my discovery in the hopes that it may help someone else.

    The problem was that I was using a template and even though the node was added, it had no idea where to display the data since the template only had the parent nodes in mind. So, adding, and utilizing the existing controls to display the data worked out.   


                                ' Display Version
                                Dim lblOldVersion As Label = DirectCast(old_version_node.FindControl("lblOldVersion"), Label)
                                lblOldVersion.Text = String.Format("Version {0}", f.Versions(_version).VersionLabel)

                                ' Display Last updated
                                Dim lblLastUpdated As Label = DirectCast(old_version_node.FindControl("lblLastUpdated"), Label)
                                lblLastUpdated.Text = "  Last Updated " & f.Versions(_version).Created

Back to Top