当前位置: 首页>>代码示例>>C#>>正文


C# RadTreeNode.ExpandChildNodes方法代码示例

本文整理汇总了C#中RadTreeNode.ExpandChildNodes方法的典型用法代码示例。如果您正苦于以下问题:C# RadTreeNode.ExpandChildNodes方法的具体用法?C# RadTreeNode.ExpandChildNodes怎么用?C# RadTreeNode.ExpandChildNodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RadTreeNode的用法示例。


在下文中一共展示了RadTreeNode.ExpandChildNodes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

 public void Initialize()
 {
     var categories = _categoryService.GetAll();
     var nodes = RecursivelySetTreeNode(categories, null);
     var rootNode = new RadTreeNode("Root", "-1");
     rootNode.Nodes.AddRange(nodes);
     rootNode.ExpandChildNodes();
     _categoryListingView.Categories.Nodes.Add(rootNode);
     _categoryListingView.Categories.ExpandAllNodes();
     _categoryListingView.Categories.DataBind();
 }
开发者ID:reyrahadian,项目名称:PFM,代码行数:11,代码来源:CategoryListingPresenter.cs

示例2: RefreshCommandsView


//.........这里部分代码省略.........
                    {
                        selected_condition_1st_field = ConditionEntry["condition_1st_field"].ToString();
                    }
                    else
                    {
                        ArrayList DataSourceDatabaseTableFields = (ArrayList)State["DataSourceDatabaseTableFields"];
                        selected_condition_1st_field = DataSourceDatabaseTableFields[0].ToString();
                    }
                    Control WhereControl = LoadControl("Controls/SpreadsheetWhere.ascx", selected_condition_1st_field);

                    if (State["SpreadsheetError"] != null)
                    {
                        ResetDatabaseConfig_Click(null, null);
                        Message.Text = State["SpreadsheetError"].ToString();
                        State["SpreadsheetError"] = null;
                        State["DBCommands"] = null;
                        State["SelectedDatabaseTable"] = null;
                        State["SelectedSqlCommand"] = null;
                        return;
                    }

                    where_node.Controls.Add(WhereControl);

                    command_node.Nodes.Add(where_node);

                    if (ConditionEntry["condition_operation"] != null && ConditionEntry["condition_operation"].ToString().Length > 0)
                    {
                        string condition_operation = ConditionEntry["condition_operation"].ToString();
                        ((RadComboBox)WhereControl.FindControl("condition_operation")).SelectedValue = condition_operation;
                    }
                    else
                    {
                        ConditionEntry["condition_operation"] = ((RadComboBox)WhereControl.FindControl("condition_operation")).SelectedValue;
                    }
                   if (ConditionEntry["field_operation"] != null && ConditionEntry["field_operation"].ToString().Length > 0)
                    {
                        string field_operation = ConditionEntry["field_operation"].ToString();
                        ((RadComboBox)WhereControl.FindControl("field_operation")).SelectedValue = field_operation;
                    }
                    else
                    {
                        ConditionEntry["field_operation"] = ((RadComboBox)WhereControl.FindControl("field_operation")).SelectedValue;
                    }
                    if (ConditionEntry["condition_2nd_field"] != null && ConditionEntry["condition_2nd_field"].ToString().Length > 0)
                    {
                        string condition_2nd_field = ConditionEntry["condition_2nd_field"].ToString();
                        HtmlInputText condition_2nd_field_input = (HtmlInputText)WhereControl.FindControl("condition_2nd_field");
                        condition_2nd_field_input.Value = condition_2nd_field;
                    }
                    i_condition++;
                    sub_command_index++;
                }
            }
            Hashtable DBOrderBy = (Hashtable)CommandEntry["order_by"];
            if (DBOrderBy != null)
            {
                RadTreeNode orderBy_node = new RadTreeNode();
                orderBy_node.CssClass = "RadTreeView";
                orderBy_node.Category = "order_by";
                orderBy_node.PostBack = false;
                State["SelectedDatabaseTable"] = selected_table;
                string selected_sort_field = null;
                if (DBOrderBy["sort_field"] != null && DBOrderBy["sort_field"].ToString().Length > 0)
                {
                    selected_sort_field = DBOrderBy["sort_field"].ToString();
                }
                else
                {
                    ArrayList DataSourceDatabaseTableFields = (ArrayList)State["DataSourceDatabaseTableFields"];
                    selected_sort_field = DataSourceDatabaseTableFields[0].ToString();
                }

                Control OrderByControl = LoadControl("Controls/DatabaseOrderBy.ascx", selected_sort_field);
                if (State["SpreadsheetError"] != null)
                {
                    ResetDatabaseConfig_Click(null, null);
                    Message.Text = State["SpreadsheetError"].ToString();
                    State["SpreadsheetError"] = null;
                    State["DBCommands"] = null;
                    State["SelectedDatabaseTable"] = null;
                    State["SelectedSqlCommand"] = null;
                    return;
                }

                orderBy_node.Controls.Add(OrderByControl);
                command_node.Nodes.Add(orderBy_node);

                if (DBOrderBy["sort_direction"] != null && DBOrderBy["sort_direction"].ToString().Length > 0)
                {
                    string sort_direction = DBOrderBy["sort_direction"].ToString();
                    ((RadComboBox)OrderByControl.FindControl("sort_direction")).SelectedValue = sort_direction;
                }
                sub_command_index++;
            }

            command_node.ExpandChildNodes();
            command_index++;
        }
        SpreadsheetCommandsView.ExpandAllNodes();
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:GoogleSpreadsheetOperations.aspx.cs

示例3: RefreshCommandsView


//.........这里部分代码省略.........
                    {
                        ConditionEntry["condition_operation"] = ((RadComboBox)WhereControl.FindControl("condition_operation")).SelectedValue;
                    }
                    if (ConditionEntry["condition_1st_field"] != null && ConditionEntry["condition_1st_field"].ToString().Length > 0)
                    {
                        string condition_1st_field = ConditionEntry["condition_1st_field"].ToString();
                        //check if database field is in combobox
                        RadComboBox condition_1st_field_select = (RadComboBox)WhereControl.FindControl("condition_1st_field");
                        if (condition_1st_field_select.Items.FindItemByValue(condition_1st_field) != null)
                            condition_1st_field_select.SelectedValue = condition_1st_field;
                        else //add select item
                        {
                            condition_1st_field_select.Items.Insert(0,new RadComboBoxItem("Select ->","no_value"));
                            condition_1st_field_select.SelectedIndex = 0;
                        }
                    }
                    else
                    {
                        ConditionEntry["condition_1st_field"] = ((RadComboBox)WhereControl.FindControl("condition_1st_field")).SelectedValue;
                    }
                    if (ConditionEntry["field_operation"] != null && ConditionEntry["field_operation"].ToString().Length > 0)
                    {
                        string field_operation = ConditionEntry["field_operation"].ToString();
                        ((RadComboBox)WhereControl.FindControl("field_operation")).SelectedValue = field_operation;
                    }
                    else
                    {
                        ConditionEntry["field_operation"] = ((RadComboBox)WhereControl.FindControl("field_operation")).SelectedValue;
                    }
                    if (ConditionEntry["condition_2nd_field"] != null && ConditionEntry["condition_2nd_field"].ToString().Length > 0)
                    {
                        string condition_2nd_field = ConditionEntry["condition_2nd_field"].ToString();
                        RadComboBox condition_2nd_field_combo = (RadComboBox)WhereControl.FindControl("condition_2nd_field");
                        condition_2nd_field_combo.SelectedIndex = -1;
                        condition_2nd_field_combo.Text = condition_2nd_field;
                    }
                    else
                    {
                        ConditionEntry["condition_2nd_field"] = ((RadComboBox)WhereControl.FindControl("condition_2nd_field")).Text;
                    }
                    i_condition++;
                    sub_command_index++;
                }
            }
            Hashtable DBOrderBy = (Hashtable)CommandEntry["order_by"];
            if (DBOrderBy != null)
            {
                RadTreeNode orderBy_node = new RadTreeNode();
                orderBy_node.CssClass = "RadTreeView";
                orderBy_node.Category = "order_by";
                orderBy_node.PostBack = false;
                 State["SelectedDatabaseTable"] = table;
                Control OrderByControl = LoadControl("Controls/DatabaseOrderBy.ascx");
                if ( State["SpreadsheetError"] != null)
                {
                    GoogleDocsConfigMessage.Text =  State["SpreadsheetError"].ToString();
                    return;
                }

                orderBy_node.Controls.Add(OrderByControl);
                command_node.Nodes.Add(orderBy_node);

                if (DBOrderBy["sort_field"] != null && DBOrderBy["sort_field"].ToString().Length > 0)
                {
                    string sort_field = DBOrderBy["sort_field"].ToString();
                    //check if database_field is in combobox
                    RadComboBox sort_field_select = (RadComboBox)OrderByControl.FindControl("sort_field");
                    if (sort_field_select.Items.FindItemByValue(sort_field) != null)
                        sort_field_select.SelectedValue = sort_field;
                    else //add select item
                    {
                        sort_field_select.Items.Insert(0, new RadComboBoxItem("Select ->", "no_value"));
                        sort_field_select.SelectedIndex = 0;
                    }
                }
                else
                {
                    DBOrderBy["sort_field"] = ((RadComboBox)OrderByControl.FindControl("sort_field")).SelectedValue;
                }
                if (DBOrderBy["sort_direction"] != null && DBOrderBy["sort_direction"].ToString().Length > 0)
                {
                    string sort_direction = DBOrderBy["sort_direction"].ToString();
                    ((RadComboBox)OrderByControl.FindControl("sort_direction")).SelectedValue = sort_direction;
                }
                else
                {
                    DBOrderBy["sort_direction"] = ((RadComboBox)OrderByControl.FindControl("sort_direction")).SelectedValue;
                }
                sub_command_index++;
            }

            command_node.ExpandChildNodes();
            command_index++;
        }
        if ( State["ManageDataType"].ToString() == "database")
            DatabaseCommandsView.ExpandAllNodes();

        else
            SpreadsheetCommandsView.ExpandAllNodes();
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:ManageData.aspx.cs

示例4: InitWebServiceNodes


//.........这里部分代码省略.........
                  State["WebServiceResponseTreeViewNodeText"].ToString() == web_method_name)
            {
                //make sure we are in the right event
                XmlNode method_node = mapped_node.ParentNode.SelectSingleNode("method");
                if (method_node != null && method_node.InnerText == web_method_name)
                {
                    XmlDocument TestDoc = (XmlDocument) State["WebServiceTestDoc"];
                    out_method_node = new RadTreeNode(web_method_name);
                     State["WebServiceResponseTreeViewMethodText"] = web_method_name;
                    out_method_node.CssClass = "RadTreeView";
                    out_method_node.ImageUrl = "~/images/backward_nav.gif";
                    out_method_node.Category = "method";
                    out_method_node.Value = service_url + ";" + web_method_name + ";";
                    out_url.Nodes.Add(out_method_node);
                    out_method_node.Value.Remove(out_method_node.Value.Length - 1, 1);
                    WebServiceResponseTreeView.ExpandAllNodes();

                    XmlToTreeViewNode(TestDoc.FirstChild.NextSibling, out_method_node, web_method_name);

                    out_method_node.ExpandParentNodes();

                    Session.Remove("WebServiceTestDoc");
                }
            }
            else if (mapped_node != null)
            {
                XmlNode web_service_node = mapped_node.ParentNode.SelectSingleNode("web_service[.='" + service_url + "']");
                XmlNode method_node = mapped_node.ParentNode.SelectSingleNode("method[.='" + web_method_name + "']");
                if (web_service_node != null && method_node != null)
                {
                    in_method_node.BackColor = Color.LightCoral;

                    out_method_node = new RadTreeNode(web_method_name);
                    out_method_node.CssClass = "RadTreeView";
                    out_method_node.ImageUrl = "~/images/backward_nav.gif";
                    out_method_node.Category = "method";
                    out_method_node.Value = service_url + ";" + web_method_name + ";";
                    out_url.Nodes.Add(out_method_node);
                    out_method_node.Value.Remove(out_method_node.Value.Length - 1, 1);
                    WebServiceResponseTreeView.ExpandAllNodes();
                }
            }

            XmlNodeList parms = web_method.SelectNodes("s:complexType/s:sequence/s:element", nsmgr);
            foreach (XmlNode parm in parms)
            {
                string parm_name = parm.Attributes["name"].Value;
                MethodInputs.Add(parm_name);
                if (out_method_node != null)
                    out_method_node.Value += parm_name + ",";
                RadTreeNode parm_node = new RadTreeNode(parm_name);
                parm_node.CssClass = "RadTreeView";
                parm_node.ImageUrl = "~/images/dot.gif";
                parm_node.Category = "input";
                parm_node.BackColor = Color.FromArgb(250, 252, 156);
                in_method_node.Nodes.Add(parm_node);

                if (mapped_node != null)
                {
                    XmlNode web_service_node = mapped_node.ParentNode.SelectSingleNode("web_service[.='" + service_url + "']");
                    XmlNode method_node = mapped_node.ParentNode.SelectSingleNode("method[.='" + web_method_name + "']");
                    if (web_service_node != null && method_node != null)
                    {
                        XmlNode web_service_method_input_node = mapped_node.ParentNode.SelectSingleNode("input_mapping/web_service_method_input[.='" + parm_name + "']");
                        if (web_service_method_input_node != null)
                        {
                            XmlNode input_field_node = web_service_method_input_node.ParentNode.SelectSingleNode("input_field");
                            if (input_field_node != null)
                            {
                                string request_name = input_field_node.InnerText;
                                XmlNode field_node = doc.SelectSingleNode("//id[.='" + request_name + "']");
                                RadTreeNode request_node = null;
                                if (field_node == null)

                                    request_node = util.CreateFieldNode(parm_node, request_name, "");
                                else
                                    request_node = util.CreateFieldNode(parm_node, request_name, field_node.ParentNode.Name);

                                request_node.Text = request_name;
                                request_node.Category = "request";
                                request_node.BackColor = Color.FromArgb(153, 255, 185); //LIGHT GREEN
                            }
                        }
                    }
                }
            }
            RadTreeNode save_method_node = new RadTreeNode("Save calling this method with 0 or more inputs mapped");
            save_method_node.CssClass = "RadTreeView";
            save_method_node.ImageUrl = "~/images/save.gif";
            save_method_node.Category = "save";
            in_method_node.Nodes.Add(save_method_node);

            RadTreeNode undo_method_inputs_node = new RadTreeNode("Undo mapping of device fields to this method");
            undo_method_inputs_node.CssClass = "RadTreeView";
            undo_method_inputs_node.ImageUrl = "~/images/cancel.png";
            undo_method_inputs_node.Category = "delete";
            in_method_node.Nodes.Add(undo_method_inputs_node);
            in_method_node.ExpandChildNodes();
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:ManageData.aspx.cs

示例5: RefreshCommandsView


//.........这里部分代码省略.........
        }
        ArrayList DBWhere = (ArrayList)CommandEntry["conditions"];
        if (DBWhere != null)
        {
            int i_condition = 0;
            // Hashtable uniqueConditionIDs = new Hashtable();
            Hashtable TestWhereValueMap = new Hashtable();
            State["TestWhereValueMap"] = TestWhereValueMap;

            foreach (Hashtable ConditionEntry in DBWhere)
            {
                if (i_condition == 0)
                    State["IsFirstCommandCondition"] = true;
                else
                    State["IsFirstCommandCondition"] = false;

                RadTreeNode where_node = new RadTreeNode();
                where_node.CssClass = "RadTreeView";
                where_node.Category = "condition";
                where_node.PostBack = false;
                State["SelectedDatabaseTable"] = selected_table;
                string selected_condition_1st_field = null;
                if (ConditionEntry["condition_1st_field"] != null && ConditionEntry["condition_1st_field"].ToString().Length > 0)
                {
                    selected_condition_1st_field = ConditionEntry["condition_1st_field"].ToString();
                }
                  Control WhereControl = LoadControl("../Controls/SpreadsheetWhereTest.ascx", selected_condition_1st_field);

                if (State["SpreadsheetError"] != null)
                {
                    Message.Text = State["SpreadsheetError"].ToString();
                    State["SpreadsheetError"] = null;
                    State["DBCommands"] = null;
                    State["SelectedDatabaseTable"] = null;
                    State["SelectedSqlCommand"] = null;
                    return;
                }

                where_node.Controls.Add(WhereControl);

                command_node.Nodes.Add(where_node);

                if (ConditionEntry["condition_operation"] != null && ConditionEntry["condition_operation"].ToString().Length > 0)
                {
                    string condition_operation = ConditionEntry["condition_operation"].ToString();
                    ((HtmlInputText)WhereControl.FindControl("condition_operation")).Value = condition_operation;
                }

                if (ConditionEntry["field_operation"] != null && ConditionEntry["field_operation"].ToString().Length > 0)
                {
                    string field_operation = ConditionEntry["field_operation"].ToString();
                    ((HtmlInputText)WhereControl.FindControl("field_operation")).Value = field_operation;
                }

                TestWhereValueMap[i_condition] = (HtmlInputText)WhereControl.FindControl("condition_2nd_field");

                i_condition++;
                sub_command_index++;
            }
        }
        Hashtable DBOrderBy = (Hashtable)CommandEntry["order_by"];
        if (DBOrderBy != null)
        {
            RadTreeNode orderBy_node = new RadTreeNode();
            orderBy_node.CssClass = "RadTreeView";
            orderBy_node.Category = "order_by";
            orderBy_node.PostBack = false;
            State["SelectedDatabaseTable"] = selected_table;
            string selected_sort_field = null;
            if (DBOrderBy["sort_field"] != null && DBOrderBy["sort_field"].ToString().Length > 0)
            {
                selected_sort_field = DBOrderBy["sort_field"].ToString();
            }

            Control OrderByControl = LoadControl("../Controls/DatabaseOrderByTest.ascx", selected_sort_field);
            if (State["SpreadsheetError"] != null)
            {
                Message.Text = State["SpreadsheetError"].ToString();
                State["SpreadsheetError"] = null;
                State["DBCommands"] = null;
                State["SelectedDatabaseTable"] = null;
                State["SelectedSqlCommand"] = null;
                return;
            }

            orderBy_node.Controls.Add(OrderByControl);
            command_node.Nodes.Add(orderBy_node);

            if (DBOrderBy["sort_direction"] != null && DBOrderBy["sort_direction"].ToString().Length > 0)
            {
                string sort_direction = DBOrderBy["sort_direction"].ToString();
                ((HtmlInputText)OrderByControl.FindControl("sort_direction")).Value = sort_direction;
            }
            sub_command_index++;
        }

        command_node.ExpandChildNodes();

        SpreadsheetCommandView.ExpandAllNodes();
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:TestQuery.aspx.cs


注:本文中的RadTreeNode.ExpandChildNodes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。