类似这样的绑定 BindClassTree("0", 0);protected void BindClassTree(string parentID, int leve)
{
foreach (DataRow row in Cache_Class.Select("parent_id='" + parentID + "'", "OrderID DESC,ID DESC"))
{
if (classID != row["classID"].ToString())
{
ddl_parentID.Items.Add(new ListItem(Utils.GetSpacesString(leve).Replace(" ", " ") + "|-" + row["className"].ToString(), row["classID"].ToString()));
BindClassTree(row["classID"].ToString(), leve + 1);
}
}
}
{
foreach (DataRow row in Cache_Class.Select("parent_id='" + parentID + "'", "OrderID DESC,ID DESC"))
{
if (classID != row["classID"].ToString())
{
ddl_parentID.Items.Add(new ListItem(Utils.GetSpacesString(leve).Replace(" ", " ") + "|-" + row["className"].ToString(), row["classID"].ToString()));
BindClassTree(row["classID"].ToString(), leve + 1);
}
}
}
解决方案 »
- ASPxGridView控件的一个问题,上一页下一页不管用。
- 搞应用开发也遇到算法问题,求助,你肯定感兴趣的
- WebConfig中的标签自动提示的成员为何只有三个?
- 这个sql怎么写,对两个表的汇总查询?
- System.Data.SqlClient.SqlException: 将数据类型 varchar 转换为 numeric 时出错。
- 请教下~~这种页面效果该怎么实现啊????
- 小女子下跪求帅哥来帮我了,我好想啊~~~~~
- 关于 TreeView 节点删除
- 各位大虾,请问怎样生成静态页面?
- 文件下载的问题
- 检测到有潜在危险的 Request.Form 值的问题
- ASp.net Mvc4 使用Razor模板后,打开相应页面没有样式,但是数据可以显示?
请问怎么才能根据这两个字段绑定数据呢?
Level Line Tier
0 181 181
1 181 190
1 181 192
1 181 194
........