asp.net使用DataGridTree实现下拉树的方法

2019-05-23 07:25:39丽君

                            {
                                currentsign = getprefix(lastonecount == childlist.count, false, parrentsign);
                                listitem = new listitem(currentsign + entry.value, entry.key);
                            }
                            if (ddlgoodstype.items.count != 0)
                            {
                                itemindexof = string.isnullorempty(currentid) ? itemindexof + 1 : ddlgoodstype.items.indexof(ddlgoodstype.items.findbyvalue(currentid)) + lastonecount;
                            }
                            ddlgoodstype.items.insert(itemindexof, listitem);//添加子节点
                            lastonecount++;
                        }
                        if (parentkeylist.count > 0)//存在子节点时
                        {
                            currentid = parentkeylist.dequeue();
                            parrentsign = parentsignlist.dequeue();