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

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

                    if (childlist != null && childlist.count > 0)
                    {
                        if (!string.isnullorempty(removeid) && childlist.containskey(removeid))
                        {
                            childlist.remove(removeid);
                        }
                        foreach (keyvaluepair<string, string> entry in childlist)
                        {
                            if (_dropdowntree.getchildcategory(entry.key) != null)//存在子
                            {
                                currentsign = getprefix(lastonecount == childlist.count, true, parrentsign);
                                listitem = new listitem(currentsign + entry.value, entry.key);
                                parentkeylist.enqueue(entry.key);//当前的节点id
                                parentsignlist.enqueue(currentsign);//当前的节点符号
                            }
                            else//不存在子