DataTable 递归 简单的程序,来实现无限级列表 结合 jquery.table.js 实现
protected void DiGuiDataTable(DataTable FromDataTable, DataTable ToDataTable, object pid) { if (FromDataTable.Select("pid='" + pid + "'").Length > 0) { foreach (DataRow item in FromDataTable.Select("pid='" + pid + "'")) { ToDataTable.Rows.Add(item.ItemArray); DiGuiDataTable(FromDataTable, ToDataTable, item["id"]); } } }
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------