//以下为TreeList控件样式相关设置
this.treelist_SystemCfg.BackColor = Color.Transparent;
this.treelist_SystemCfg.Appearance.Empty.BackColor = Color.Transparent;
this.treelist_SystemCfg.Appearance.Row.BackColor = Color.Transparent;
this.treelist_SystemCfg.OptionsView.ShowColumns = false;
//Node名称不可编辑
this.treelist_SystemCfg.OptionsBehavior.Editable = false;
this.treelist_SystemCfg.OptionsView.ShowHorzLines = false;
this.treelist_SystemCfg.OptionsView.ShowIndicator = false;
this.treelist_SystemCfg.OptionsView.ShowVertLines = false;
this.treelist_SystemCfg.OptionsSelection.InvertSelection = true;
this.treelist_SystemCfg.LookAndFeel.UseDefaultLookAndFeel = false;
this.treelist_SystemCfg.LookAndFeel.UseWindowsXPTheme = true; this.treelist_SystemCfg.Columns.Clear();
TreeListColumn tc1 = new TreeListColumn();
tc1.Name = "ID";
tc1.FieldName = "ID";
tc1.Caption = "ID";
tc1.VisibleIndex = 0;//此为必须设置的属性,否则无法显示列
tc1.Visible = false; TreeListColumn tc2 = new TreeListColumn();
tc2.Name = "Name";
tc2.FieldName = "Name";
tc2.Caption = "Name";
tc2.VisibleIndex =1;//此为必须设置的属性,否则无法显示列 this.treelist_SystemCfg.Columns.Add(tc1);
this.treelist_SystemCfg.Columns.Add(tc2);
this.treelist_SystemCfg.Nodes.Clear();
this.treelist_SystemCfg.AppendNode(new object[] { "0", "中碧数据服务平台(双击刷新)" }, null);

  

04-17 03:58