Ejemplo n.º 1
0
        private void TreeListView_CellValueChanging(object sender, DevExpress.Xpf.Grid.TreeList.TreeListCellValueChangedEventArgs e)
        {
            try
            {
                var strSelectedTreeID = (this.treeListControl.SelectedItem as MenuListByRole).TREE_ID;      // 트리 ID
                var liFilterData      = this.MenuListByRoleList.Where(p => p.PARENT_ID.Contains(strSelectedTreeID) == true).ToList();

                if (e.Column.FieldName.Equals("ROLE_MENU_CD") == true)
                {
                    var strOldValue = e.OldValue.ToString();        // 이전 데이터
                    var strNewValue = e.Value.ToString();           // 변경 데이터

                    if (liFilterData.Count > 0)
                    {
                        foreach (var item in liFilterData)
                        {
                            item.ROLE_MENU_CD        = strNewValue;
                            item.IsSelected          = true;
                            item.IsUpdate            = true;
                            item.BaseBackgroundBrush = new SolidColorBrush(Colors.GhostWhite);
                        }
                    }

                    int iCurrentRowIndex = this.BaseClass.GetCurrentGridControlRowIndex(this.tvLeftGrid_RoleList);
                    this.RoleMgntList[iCurrentRowIndex].IsSelected = true;
                }
            }
            catch (Exception err)
            {
                this.BaseClass.Error(err);
            }
        }
Ejemplo n.º 2
0
        private void TreeListView1_CellValueChanged(object sender, DevExpress.Xpf.Grid.TreeList.TreeListCellValueChangedEventArgs e)
        {
            var state = ((EquipmentViewModel)this.DataContext).methodsEntities.Entry(e.Row).State;

            if (state != System.Data.Entity.EntityState.Added)
            {
                ((EquipmentViewModel)this.DataContext).methodsEntities.Entry(e.Row).State = System.Data.Entity.EntityState.Modified;
            }
        }
Ejemplo n.º 3
0
 private void treeListView_CellValueChanging(object sender, DevExpress.Xpf.Grid.TreeList.TreeListCellValueChangedEventArgs e)
 {
     ((TreeListView)sender)?.PostEditor();
 }