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>
代码隐藏
protected void Page_Load(object sender, EventArgs e)
{
SqlDataSourceUserMetersTree.SelectCommand = "SELECT * FROM Tree";
ASPxTreeListLocations.DataBind();
}
问题:
代码运行良好。我想递归选择,但这个属性不起作用。如果我在 aspx 端定义 SqlDataSource selectCommand,它就可以工作。我找不到任何解决方案。没有错误信息。有什么建议吗?
谢谢...