Devexpress treelist 简介

2019-12-30 15:34:16王旭

节点折叠 this.treeList1.CollapseAll();

  一、简介

二、属性列表

1、OptionsSelection:

  EnableAppearanceForcusedCell:选中的Cell的Appearance设置是否可用。默认为True;

  EnableAppearanceForcusedRow:选中的Node的Appearance设置是否可用。默认为True

  InvertSelection:设置选中风格是只应用于选中的Cell,还是应用于除选中的Cell之外的所有Cell。默认为False,即后者; 

  MultiSelect:是否可以选择多个Node。默认为False。

2、OptionsView:

   AutoCalcPreviewLineCount:是否自动计算预览节段的高度。默认为True;

   AutoWidth:是否允许列自动调整宽度;默认为True;

   EnableAppearanceEvenRow:生成偶数Node时,是采用由

  TreeListAppearanceCollection.EvenRow属性提供的Appearance

    设置,还是采用由TreeListAppearanceCollection.Row提供的

   Appearance设置。默认为False,即后者;

   EnableAppearanceOddRow:生成奇数Node时,是采用由

  TreeListAppearanceCollection.OddRow属性提供的Appearance

    设置,还是采用由TreeListAppearanceCollection.Row提供的

   Appearance设置。默认为False,即后者;

   ShowButtons:是否显示展开与收缩按钮。默认为True;

   ShowCloumns:是否显示列标题。默认为True;

   ShowFocusedFrame:在获得焦点的Cell上,是否显示焦点框架。默认为True;

   ShowHorzLines:是否显示水平线。默认为True;

   ShowIndentAsRowStyle:是否用相应Node的Appearance设置来生成Tree的缩进。默认为False

   ShowIndicator:是否显示Node的指示符面板。默认为True;

  ShowPreview:是否显示预览节段。默认为False;

  ShowRoot:是否在根Node间显示连接线。默认为True;

   ShowRowFooterSummary:是否显示分组脚注。默认为False;

  ShowSummaryFooter:是否显示摘要脚注。默认为False;

  ShowVertLines:是否显示垂直线。默认为True;

3、SelectImageList:选中Node时,显示图片的列表;

4、StateImageList:指明Node状态的图片的列表;

三、事件

四、使用

1、 如何隐藏TreeList的列头

   设置TreeListr的OptionsView的ShowColumns属性为:False

2、 如何默认展开所有的节点ExpandAll()

   tlvWells.ExpandAll();

    以及TreeNode.Expand   =   false  

    或者你可以控制展开的层数 reeView1.ExpandLevel=10; 展开10层