| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// |
| | | /// </summary> |
| | | public static class TreeListExtensions |
| | | { |
| | |
| | | { |
| | | InitialDefaultSettings(rhs, height); |
| | | rhs.CheckBoxFieldName = checkBoxFieldName;//多选框绑定列名 |
| | | rhs.OptionsBehavior.AllowRecursiveNodeChecking = true;//获取或设置父节点时是否自动检查/取消检查子节点 |
| | | rhs.OptionsBehavior.AllowRecursiveNodeChecking = true;//获取或设置父节点时是否自动检查/取消检查子节点 |
| | | rhs.OptionsView.CheckBoxStyle = DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle.Check;//设置勾选框样式 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化可编辑视图 |
| | | /// </summary> |
| | | /// </summary> |
| | | public static void InitialBindingNormalEditView(this TreeList rhs, int height = 30) |
| | | { |
| | | rhs.OptionsSelection.EnableAppearanceFocusedCell = false; |
| | |
| | | rhs.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; |
| | | rhs.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; |
| | | rhs.RowHeight = height; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | InitialDefaultSettings(rhs, height); |
| | | rhs.CheckBoxFieldName = checkBoxFieldName;//多选框绑定列名 |
| | | rhs.OptionsBehavior.AllowRecursiveNodeChecking = true;//获取或设置父节点时是否自动检查/取消检查子节点 |
| | | rhs.OptionsBehavior.AllowRecursiveNodeChecking = true;//获取或设置父节点时是否自动检查/取消检查子节点 |
| | | rhs.OptionsView.CheckBoxStyle = DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle.Check;//设置勾选框样式 |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 渐变色 |
| | |
| | | |
| | | /// <summary> |
| | | /// 设置拖拽状态下的普通视图 |
| | | /// </summary> |
| | | /// </summary> |
| | | public static void SetDragViewModels<t>(this TreeList rhs) where t : class |
| | | { |
| | | rhs.DragDrop += (sender, e) => |
| | |
| | | foreach (TreeListNode n in node.Nodes) |
| | | InsertBrush(list, n, parent); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |