Asp.net 加载中的radtreeview绑定问题
我正试图在页面加载时绑定radtreeview,如下所示,但我无法在页面上看到带有绑定数据的radtreeview,我可以看到列表中的数据。ParentId、.Id、.Name、.ParentName 有人能调查一下吗Asp.net 加载中的radtreeview绑定问题,asp.net,telerik,radtreeview,Asp.net,Telerik,Radtreeview,我正试图在页面加载时绑定radtreeview,如下所示,但我无法在页面上看到带有绑定数据的radtreeview,我可以看到列表中的数据。ParentId、.Id、.Name、.ParentName 有人能调查一下吗 < telerik:RadTreeView ID="rtvMyConnections" runat="server" ToolTip="" Skin="DV" EnableEmbeddedSkins="false" CheckBoxes="true" >
< telerik:RadTreeView ID="rtvMyConnections" runat="server" ToolTip="" Skin="DV" EnableEmbeddedSkins="false" CheckBoxes="true" >
</telerik:RadTreeView>
Dim lstresult As New List(Of MyEntity)
Dim svcProxy As IConnectionService = CreateConnectionChannelFactory()
lstresult = svcProxy.LoadMyConnectionsXML()
rtvMyConnections.DataTextField = "ParentName"
rtvMyConnections.DataFieldParentID = "ParentId"
rtvMyConnections.DataFieldID = "Id"
rtvMyConnections.DataValueField = "Name"
rtvMyConnections.DataSource = lstresult
rtvMyConnections.DataBind()
将结果作为新列表(我的实体)
Dim svcProxy As IConnectionService=CreateConnectionChannelFactory()
lstreult=svcProxy.LoadMyConnectionsXML()
rtvMyConnections.DataTextField=“ParentName”
rtvMyConnections.DataFieldParentID=“ParentId”
rtvMyConnections.DataFieldID=“Id”
rtvMyConnections.DataValueField=“Name”
rtvMyConnections.DataSource=lstresult
rtvMyConnections.DataBind()
您是否尝试为radtreeview提供宽度和高度?可能是因为ParentID字段值问题,您无法在radtreeview中查看数据。请在parentId字段中临时设置null或零,并进行检查。是的,与parentId有关。我将尝试一下。谢谢