DevExpress.XtraTreeList 小结

搞了半天才绑定好,没有弄清楚父子之间的关系

 

        <dx:ASPxTreeList ID="ASPxTreeList1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="child_id" ParentFieldName="parent_id">
            <Columns>
                <dx:TreeListTextColumn FieldName="Product_name" VisibleIndex="0">
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="Product_sum" VisibleIndex="1">
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="support_id" VisibleIndex="2">
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="child_id" VisibleIndex="3">
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="parent_id" VisibleIndex="4">
                </dx:TreeListTextColumn>
            </Columns>
            <SettingsSelection AllowSelectAll="True" Enabled="True" Recursive="True" />
        </dx:ASPxTreeList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Test_CumtomConnectionString %>"SelectCommand="SELECT * FROM [db_product_information]"
       

 

 

额,我怕忘了,就先传点,主要是关系要对好

这边

KeyFieldName="child_id"        
ParentFieldName="parent_id"
posted @ 2013-06-23 17:49  南修子  阅读(364)  评论(0编辑  收藏  举报