Asp.net DevExpress树列表设置选择递归

Asp.net DevExpress树列表设置选择递归,asp.net,devexpress,Asp.net,Devexpress,ASPX <dx:ASPxTreeList ID="ASPxTreeListLocations" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSourceUserMetersTree" KeyFieldName="sno" ParentFieldName="ParentId" Width="300px" SettingsSelection-Recursive="true" Theme="Of

ASPX

<dx:ASPxTreeList ID="ASPxTreeListLocations" runat="server" AutoGenerateColumns="False"
    DataSourceID="SqlDataSourceUserMetersTree" KeyFieldName="sno" ParentFieldName="ParentId"
    Width="300px" SettingsSelection-Recursive="true" Theme="Office2010Black">
    <Columns>
        <dx:TreeListTextColumn FieldName="Text" VisibleIndex="0" Caption="Lokasyon">
        </dx:TreeListTextColumn>
    </Columns>
    <SettingsBehavior AutoExpandAllNodes="True" />
    <SettingsSelection Enabled="True" />
</dx:ASPxTreeList>
<asp:SqlDataSource ID="SqlDataSourceUserMetersTree" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>">
</asp:SqlDataSource>
问题:

代码运行良好。我想递归选择,但此属性不起作用。如果我在aspx端定义SqlDataSource selectCommand,它就可以工作。我找不到任何解决办法。没有错误消息。有什么建议吗


谢谢…

尝试将选项
recursive=“true”
添加到树设置中,
NP

在代码隐藏中定义selectcommand时,ASPxTreeList是否填充了数据?是。数据是预期的。我可以检索和更改数据。所有关于treeList的信息都有效。请检查此项。您可以将您的评论作为答案。我会接受的。请检查此链接:
protected void Page_Load(object sender, EventArgs e)
{
    SqlDataSourceUserMetersTree.SelectCommand = "SELECT * FROM Tree";
    ASPxTreeListLocations.DataBind();
}