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


C# TreeGridNode.Expand方法代码示例

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


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

示例1: ReturnHierarchy

		public TreeGridView ReturnHierarchy(object currObj, string classname)
		{
			InitializeImageList();
			TreeGridView treegrid = InitializeTreeGridView();

			try
			{
				TreeGridNode rootNode = new TreeGridNode();
				treegrid.Nodes.Add(rootNode);

				IReflectClass rclass = DataLayerCommon.ReflectClassForName(classname);
				IType type = ResolveType(rclass);

				rootNode.Cells[0].Value = AppendIDTo(type.FullName, GetLocalID(currObj), type);
				rootNode.Cells[1].Value = ClassNameFor(currObj.ToString());
				SetFieldType(rootNode, type);
				rootNode.Tag = currObj;
				rootNode.Cells[1].ReadOnly = true;
				rootNode.Expand();
				rootNode.ImageIndex = 0;
				classname = DataLayerCommon.RemoveGFromClassName(classname);

				TraverseObjTree(ref rootNode, currObj, classname);
			}
			catch (Exception oEx)
			{
				LoggingHelper.HandleException(oEx);
			}
			return treegrid;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:30,代码来源:RenderHierarchy.cs

示例2: RenderTreeGridViewDetails

		public TreeGridView RenderTreeGridViewDetails(long id, string classname)
		{
			InitializeImageList();
			treegrid = InitializeTreeGridView();
			bool readOnly=OMEInteraction.GetCurrentConnParams().ConnectionReadOnly;
			ProxyTreeGridRenderer item = AssemblyInspectorObject.DataPopulation.GetTreeGridViewDetails(readOnly,id, classname);
			TreeGridNode rootNode = new TreeGridNode();
			treegrid.Nodes.Add(rootNode);
			PopulateNode(rootNode, item);
			rootNode.Expand();
			rootNode.ImageIndex = 0;
			List<ProxyTreeGridRenderer> proxyList = AssemblyInspectorObject.DataPopulation.TransverseTreeGridViewDetails(readOnly,id,classname);
            foreach (ProxyTreeGridRenderer item1 in proxyList)
			{
				PopulateTreeGridNode(rootNode, item1);
			}

			return treegrid;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:19,代码来源:RenderTreeGridView.cs

示例3: BindProcessFileTreeData

        private void BindProcessFileTreeData(TreeGridView tgv, DataType.FileType fileType)
        {
            //this.tvFileList.Nodes.Clear();
            tgv.Nodes.Clear();
            IDocFileListService service = ServiceContainer.GetService<IDocFileListService>();
            dtDocFile = service.GetDocFileDataTableByDCID(Document.DOCID, fileType.ToString());

            //  Font boldFont = new Font(tvFileList.DefaultCellStyle.Font, FontStyle.Bold);
            Font boldFont = new Font(tgv.DefaultCellStyle.Font, FontStyle.Bold);
            //    DataView dv = new DataView(dt);
            node = new TreeGridNode();
            // dv.RowFilter = "[PARENT]=" + parentId;
            //foreach (DataRowView dr in dv)
            //{
            //    if (parentId == "0")
            //    {
            // node = tvFileList.Nodes.Add(Document.DOCNO, "", "", "", "", "", "", "");
            node = tgv.Nodes.Add(Document.DOCNO, "", "", "", "", "", "", "");
            node.DefaultCellStyle.Font = boldFont;

            // BindChildNode(node, (string)dr["PHYSICALID"]);
            HYDocumentMS.IFileHelper file = new FileHelper();
            foreach (DataRow dr in dtDocFile.Rows)
            {
                node.Nodes.Add(dr["DFL_FILE_NAME"].ToString(), file.getDocumentAllPathByPathID(dr["DFL_FILE_CHILD_PATH"].ToString()),
                      dr["DFL_VER_LATEST"].ToString(),
                                          dr["CHECKINFLG"].ToString(), dr["CHECKINDATE"].ToString(), dr["CHECKOUTFLG"].ToString(),
                                          dr["CHECKOUTDATE"].ToString(), dr["DFL_ID"].ToString());
                node.Expand();
            }
        }
开发者ID:huayancreate,项目名称:HYPDM,代码行数:31,代码来源:DocRegForm.cs

示例4: UpdateNodesForLocalList

		public static void UpdateNodesForLocalList(TreeGridView tree, TreeGridNodeCollection collection, IList<IListItem> contents)
        {
        	// Add or overwrite existing items
        	for (int i = 0; i < contents.Count; i++)
            {
        		if (i < collection.Count)
                {
                    // Overwrite
                    //if (!contents[i].IsLiteral)
                        ((TreeGridNode)collection[i]).Content = contents[i];
                }
                else
                {
                    // Add
                    //if (!contents[i].IsLiteral)
                    {
                    	TreeGridNode tn = new TreeGridNode(tree,contents[i]);
                    	tn.UserRow = false;
                    	tn.Update();
                    	collection.Add(tn);
                    	tree.Rows.Add(tn);
                    	if (contents[i] is ModuleItem)
                    		tn.Expand();
                    }
                }
            }
            // Delete other nodes
            while (collection.Count > contents.Count)
            {
                collection.RemoveAt(collection.Count - 1);
                tree.Rows.RemoveAt(tree.Rows.Count-1);
            }
            for (int i=0; i<tree.Rows.Count; i++)
            {
            	tree.InvalidateRow(i);
            }
            //tree.Update();
//            tree.UpdateSelection();
//            tree.FullUpdate();
        }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:40,代码来源:TreeGridNode.cs

示例5: CargarPartesLinea

        private void CargarPartesLinea(TreeGridNode oNodo, bool bExpandir)
        {
            Cargando.Mostrar();

            int iLineaID = Util.Entero(oNodo.Cells[CapitalHumano.iCol_com_Id].Value);
            // int iMarcaID = Util.Entero(oNodo.Parent.Cells["com_Id"].Value);
            // int iProveedorID = Util.Entero(oNodo.Parent.Parent.Cells["com_Id"].Value);
            var oDatos = Datos.GetListOf<PartesComisionesView>(c => c.LineaID == iLineaID && c.ParteID > 0).OrderBy(c => c.ParteID);
            oNodo.Nodes.Clear();
            foreach (var oReg in oDatos)
            {
                oNodo.Nodes.Add(oReg.ParteComisionID, oReg.ParteID, oReg.Parte
                    , oReg.PorcentajeNormal, oReg.ComisionFija
                    , oReg.PorcentajeUnArticulo, oReg.ArticulosEspecial, oReg.PorcentajeArticulosEspecial, oReg.PorcentajeComplementarios
                    , oReg.PorcentajeReduccionPorRepartidor, oReg.PorcentajeRepartidor, oReg.ComisionFijaRepartidor);
            }

            if (bExpandir)
                oNodo.Expand();

            Cargando.Cerrar();
        }
开发者ID:moisesiq,项目名称:aupaga,代码行数:22,代码来源:CapitalHumano.cs

示例6: CreateCoverageNode

 /// <summary>
 /// Create a TreeGridNode for a coverage item.
 /// </summary>
 /// <param name="parent">Parent of the tree node.</param>
 /// <param name="item">Coverage item.</param>
 /// <returns>TreeGridNode for the coverage item.</returns>
 private TreeGridNode CreateCoverageNode(TreeGridNode parent, CoverageItem item)
 {
     TreeGridNode node = new TreeGridNode { Tag = item };
     ((parent != null) ? parent.Nodes : _grdCoverage.Nodes).Add(node);
     node.SetValues(item.Name, item.UncoveredBlocks, item.UncoveredBlocksPercentage, item.CoveredBlocks, item.CoveredBlocksPercentage, null);
     switch (item.ItemType)
     {
         case CoverageItemType.Assembly:
             node.ImageIndex = 0;
             node.Expand();
             break;
         case CoverageItemType.Namespace:
             node.ImageIndex = 1;
             node.Expand();
             break;
         case CoverageItemType.Type:
             node.ImageIndex = 2;
             node.Expand();
             break;
         case CoverageItemType.Method:
             node.ImageIndex = 3;
             break;
     }
     return node;
 }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:31,代码来源:Viewer.cs


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