Exemplo n.º 1
0
        private void data_ContentChanged(object sender, EventArgs e)
        {
            DevExpress.Xpf.Grid.EditGridCellData data = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
            TreeListNode node = this.treeListView.GetNodeByContent(data.RowData.Row);

            this.IsExpand = node.IsExpanded;
            this._CheckItems(data.RowData.Row);
        }
Exemplo n.º 2
0
 private void TreeViewExpand_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     DevExpress.Xpf.Grid.EditGridCellData data = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
     if (this.IsExpand)
     {
         (data.RowData.View as DevExpress.Xpf.Grid.TreeListView).CollapseNode(data.RowData.RowHandle.Value);
         this.IsExpand = false;
     }
     else
     {
         (data.RowData.View as DevExpress.Xpf.Grid.TreeListView).ExpandNode(data.RowData.RowHandle.Value);
         this.IsExpand = true;
     }
     e.Handled = true;
 }
Exemplo n.º 3
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            DevExpress.Xpf.Grid.EditGridCellData data = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;

            data.ContentChanged -= new EventHandler(data_ContentChanged);
            data.ContentChanged += new EventHandler(data_ContentChanged);

            if (this.treeListView == null)
            {
                this.treeListView = data.View as DevExpress.Xpf.Grid.TreeListView;
            }
            if (this.treeView == null)
            {
                this.treeView = this.treeListView.GetAncestorByType <TreeView>();
            }
            this._CheckItems(data.RowData.Row);
        }