private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; OrderCreateMgt OptOrdList = tv.Grid.CurrentItem as OrderCreateMgt; if (OptOrdList == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 고객사 코드, 데이터 그룹, 오더 번호, 오더 라인번호 컬럼은 수정이 되지 않도록 처리한다. case "CST_CD": case "WAV_NO": case "ORD_NO": case "ORD_LINE_NO": if (OptOrdList.IsNew == false) { e.Cancel = true; OptOrdList.IsSelected = false; } break; default: break; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; RegionMgmt rMgmt = tv.Grid.CurrentItem as RegionMgmt; switch (e.Column.FieldName) { case "RGN_CD": if (rMgmt.IsNew == false) { e.Cancel = true; } break; case "REG_DT": case "REG_ID": case "UPD_DT": case "UPD_ID": e.Cancel = true; break; } }
private static void view_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; BoxTypeMgnt dataMember = tv.Grid.CurrentItem as BoxTypeMgnt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 박스 유형 코드는 수정이 되지 않도록 처리한다. case "BOX_TYPE_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } }
private void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (!IsNotExistsParamInNormativeOrProfile(((Y_NORM_PARAMETERS) e.Row).ID)) { e.Cancel = true; } }
private void view_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (e.Column.FieldName == "Number1") { e.Cancel = ((NewTestData)e.Row).MyBool; } }
void tableView1_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (_isMultiSelection) { e.Cancel = true; } }
private void tableview0_ShowingEditor(object sender, ShowingEditorEventArgs e) { // 에디터모드 진입 여부 처리 //var RowHandle = e.RowHandle; //var row0 = gridctrl0.GetRow(RowHandle); //var row1 = (Product2)e.Row; //var row = (Product2)e.Row; //if (row.IsMine) //{ // System.Diagnostics.Debug.WriteLine("ShowingEditorEvent Raised : It's Mine."); // // e.Column.AllowEditing = DevExpress.Utils.DefaultBoolean.True; // e.Cancel = false; //} //else //{ // System.Diagnostics.Debug.WriteLine("ShowingEditorEvent Raised : It's not Mine."); // // e.Column.AllowEditing = DevExpress.Utils.DefaultBoolean.False; // e.Cancel = true; //} if (e.Column.FieldName == "Freq") { e.Cancel = !(bool)gridctrl0.GetCellValue(e.RowHandle, "IsMine"); } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; if (tv.Name.Equals("tvMasterGrid") == true) { WrkPlanInfo dataMember = tv.Grid.CurrentItem as WrkPlanInfo; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // ID, 명 컬럼은 수정이 되지 않도록 처리한다. case "TOT_BOX_ID": //case "EQP_NM": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } }
void OnEditorShowing(object sender, ShowingEditorEventArgs e) { if (e.Column.FieldName != nameof(Item.AllowEdit)) { e.Cancel = !(AssociatedObject.DataControl.CurrentItem as Item).AllowEdit; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { try { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; CustMgnt dataMember = tv.Grid.CurrentItem as CustMgnt; if (dataMember == null) { return; } if (dataMember.CRT_SPR_CD.ToString().Equals("WMS")) { //CRT_SPR_CD 코드가 WMS인 경우 모든 컬럼 수정 불가 switch (e.Column.FieldName) { case "CST_CD": case "CST_NM": case "ADDR": case "ZIP_CD": case "TEL_NO": case "CRT_SPR_CD": case "USE_YN": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } else { //CRT_SPR_CD 코드가 WCS인 경우 switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 센터코드는 수정이 되지 않도록 처리한다. case "CST_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } } catch { throw; } }
/// <summary> /// 그리드 내 필수값 컬럼 Editing 여부 처리 (해당 이벤트를 사용하는 경우 Xaml단 TableView 테그내 isEnabled 속성을 정의해야 한다.) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { try { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } #region + Master Grid TableView tv = sender as TableView; MasterView masterView = tv.Grid.CurrentItem as MasterView; if (masterView == null) { return; } switch (e.Column.FieldName) { case "RECIRCULATION_COUNT": if (masterView.IS_EDITABLE_RECIRCULATION_COUNT.Equals("N")) { e.Cancel = true; } break; case "TYPE_ALLOC_NM": if (masterView.IS_EDITABLE_TYPE_ALLOC.Equals("N")) { e.Cancel = true; } break; } #endregion #region + Detail Grid ChuteMapView mapView = tv.Grid.CurrentItem as ChuteMapView; if (mapView == null) { return; } switch (e.Column.FieldName) { case "FR_RCV_DAYS": case "TO_RCV_DAYS": if (mapView.IS_EDITABLE_RCV_DAYS.Equals("N")) { e.Cancel = true; } break; } #endregion } catch { throw; } }
// событие отображения редактора ячейки private void TableView_ShowingEditor(object sender, ShowingEditorEventArgs e) { var valueEditController = ParentViewModel as IValueEditController; if (valueEditController != null) { e.Cancel = !valueEditController.EnableEdit(e.Row, e.Column.FieldName); } }
private void OnIsEditingAllowed(ShowingEditorEventArgs args) { if (args.Row == null) { return; } ////args.Cancel = ((GearPiece)args.Row).PrimaryAttribute < 1114; ////args.Cancel = ((GearPiece)args.Row).Armor < 852; }
private void GridViewBase_OnShowingEditor(object sender, ShowingEditorEventArgs e) { if (OrderEditorGrid.CurrentColumn.FieldName == "TypeName") { if (OrderEditorGrid.View.FocusedRowHandle != GridControl.NewItemRowHandle) { e.Cancel = true; } } }
//protected override void RaiseFilterChanged() //{ // base.RaiseFilterChanged(); //} private void OnShowingEditor(object sender, ShowingEditorEventArgs e) { var setts = e.Column.EditSettings as CustomGridSimpleLookupEditSettings; if (setts != null) { // такой вариант возможен , если DisplayMember = ValueMember e.Cancel = !setts.AllowEditAutofilter; } }
/// <summary> /// Check the validation when edit the existing row /// </summary> /// <param name="sender">grdWorkspaceDescriptions</param> /// <param name="e">ShowingEditorEventArgs</param> private void ViewShowingEditor(object sender, ShowingEditorEventArgs e) { if (e.RowHandle == GridControl.NewItemRowHandle) { return; } if (DescriptionListItem == null) { return; } }
/// <summary> /// Does the row editing is available(For Editable). /// </summary> /// <param name="sender">grdWorkspaceDescriptions Grid</param> /// <param name="e">ShowingEditorEventArgs</param> private void ViewShowingEditorProperty(object sender, ShowingEditorEventArgs e) { if (e.RowHandle == GridControl.NewItemRowHandle) { return; } if (WorkspaceItemProperties != null) { e.Cancel = WorkspaceItemProperties.Count() > (GrdListViewProperty.View).FocusedRowData.ControllerVisibleIndex; } }
private static void view_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; ShipToMgnt dataMember = tv.Grid.CurrentItem as ShipToMgnt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 출고처 코드는 수정이 되지 않도록 처리한다. case "SHIP_TO_CD": case "CRT_SPR_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } switch (e.Column.FieldName) { // CRT_SPR_CD가 WMS이면 모든 컬럼 수정이 불가하도록 처리한다. case "SHIP_TO_NM": case "ADDR": case "ZIP_CD": case "TEL_NO": case "RGN_CD": case "RGN_NM": if (dataMember.IsWMS == true) { e.Cancel = true; } break; default: break; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { try { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; RoleMgnt dataMember = tv.Grid.CurrentItem as RoleMgnt; if (dataMember == null) { return; } switch (e.Column.FieldName) { case "ROLE_CD": if (dataMember.IsNew == false) { if (dataMember.IsSelected == true) { dataMember.IsSelected = false; } e.Cancel = true; } break; case "USE_YN": if (dataMember.IsNew == true) { if (dataMember.IsSelected == true) { dataMember.IsSelected = false; } e.Cancel = true; } break; } } catch { throw; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; if (tv.Name.Equals("tvMasterGrid") == true) { EquipmentMgnt dataMember = tv.Grid.CurrentItem as EquipmentMgnt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 설비 ID, 설비 명 컬럼은 수정이 되지 않도록 처리한다. case "EQP_ID": //case "EQP_NM": if (dataMember.IsNew == false) { e.Cancel = true; } break; case "PCL_DTM_PROR_CD": // Parcel결정 (PCL_DTM_CD)값이 AT인 경우만 선택할 수 있다. if (dataMember.PCL_DTM_CD.Equals("AT") == false) { e.Cancel = true; } break; default: break; } } }
private void ViewShowingEditor(object sender, ShowingEditorEventArgs e) { if (e.RowHandle == GridControl.NewItemRowHandle) { return; } if (DescriptionListItem != null) { foreach ( var poiInf in DescriptionListItem.Cast <object>().Where( poiInf => (grdOverview.View.FocusedRow) == ((WorkspaceItemDescription)(poiInf)))) { e.Cancel = true; break; } } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; if (tv.Name.Equals("tvMasterGrid") == true) { ChuteMgmt dataMember = tv.Grid.CurrentItem as ChuteMgmt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 슈트 ID 컬럼은 수정이 되지 않도록 처리한다. case "CHUTE_ID": if (dataMember.IsNew == false) { e.Cancel = true; } break; case "CHUTE_DTL_USE_CD": // 슈트용도코드 (CHUTE_USE_CD)가 REJECT인 경우만 슈트상세용도코드를 활성화한다. if (dataMember.CHUTE_USE_CD.Equals("RJT") == false) { e.Cancel = true; } break; default: break; } } }
/// <summary> /// 그리드 내 필수값 컬럼 Editing 여부 처리 (해당 이벤트를 사용하는 경우 Xaml단 TableView 테그내 isEnabled 속성을 정의해야 한다.) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { try { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; DeployFileInfo dataMember = tv.Grid.CurrentItem as DeployFileInfo; if (dataMember == null) { return; } } catch { throw; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; if (tv.Name.Equals("tvMasterGrid") == true) { ChuteMgmt dataMember = tv.Grid.CurrentItem as ChuteMgmt; if (dataMember == null) { return; } switch (e.Column.FieldName) { case "EQP_ID": if (dataMember.IsNew == false) { e.Cancel = true; } break; case "CHUTE_ID": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { try { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; if (tv.Name.Equals("tvMasterGrid") == true) { IPMgmt dataMember = tv.Grid.CurrentItem as IPMgmt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 설비 ID, 설비 명 컬럼은 수정이 되지 않도록 처리한다. case "IP_NO": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } } catch { throw; } }
private static void view_ShowingEditor(object sender, ShowingEditorEventArgs e) { try { if (g_IsAuthAllYN == false) { e.Cancel = true; return; } TableView tv = sender as TableView; CenterMgnt dataMember = tv.Grid.CurrentItem as CenterMgnt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 센터코드, DB 접속 정보 컬럼은 수정이 되지 않도록 처리한다. case "CNTR_CD": case "DB_CONN_TYPE": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } catch { throw; } }
private static void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { TableView tv = sender as TableView; if (tv.Name.Equals("tvMasterGrid_First")) { SkuInfoMgmt dataMember = tv.Grid.CurrentItem as SkuInfoMgmt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 센터코드, DB 접속 정보 컬럼은 수정이 되지 않도록 처리한다. case "CRT_SPR_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; case "SKU_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } else { SkuBcrInfoMgmt dataMember = tv.Grid.CurrentItem as SkuBcrInfoMgmt; if (dataMember == null) { return; } switch (e.Column.FieldName) { // 컬럼이 행추가 상태 (신규 Row 추가)가 아닌 경우 // 센터코드, DB 접속 정보 컬럼은 수정이 되지 않도록 처리한다. case "BCR_NO": if (dataMember.IsNew == false) { e.Cancel = true; } break; case "SKU_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; case "CRT_SPR_CD": if (dataMember.IsNew == false) { e.Cancel = true; } break; default: break; } } }
void View_ShowingEditor(object sender, ShowingEditorEventArgs e) { if (e.Row != null && e.Column.FieldName == "RRP") { AnimationProductDetail apd = e.Row as AnimationProductDetail; if (apd.AnimationProduct == null) { return; } if (apd.AnimationProduct.ItemType == null) { e.Cancel = true; } else if (apd.AnimationProduct.ItemType != null) { e.Cancel = apd.AnimationProduct.ItemType.RRPAvailable == false; } } }
private void OnShowingEditor(object sender, ShowingEditorEventArgs e) { if (e.RowHandle == DataControlBase.AutoFilterRowHandle) { return; } //http://documentation.devexpress.com/#WPF/CustomDocument6135 CriteriaOperator co = null; var hascriteria = false; try { PmGridControl.BeginDataUpdate(); var row = e.Row as PmConfiguratorData; if (row == null) { e.Cancel = true; return; } var column = e.Column; if (column.FieldName == PmConfiguratorData.ObjectEntityCodePropertyName) { if (string.IsNullOrEmpty(row.PmCode)) { e.Cancel = true; return; } //Если сделать в Loaded не работает клизма var settings = column.EditSettings as IConfiguratorSettingsBase; if (settings != null) { hascriteria = true; var pmkeys = _vm.GetEntityIds(); foreach (var p in pmkeys) { co |= new BinaryOperator(SysObject.ObjectIDPropertyName, p, BinaryOperatorType.Equal); } settings.LookupFilterCriteria = co; } } else if (column.FieldName == PmConfiguratorData.ObjectNamePropertyName) { if (string.IsNullOrEmpty(row.PmCode) || string.IsNullOrEmpty(row.OjectEntityCode)) { e.Cancel = true; return; } var settings = column.EditSettings as IConfiguratorSettingsBase; if (settings != null) { hascriteria = true; var pmkeys = _vm.GetAttributes(row.OjectEntityCode); //CriteriaOperator co = new BinaryOperator(SysObject.ObjectIDPropertyName, (object)null, BinaryOperatorType.Equal); foreach (var p in pmkeys) { co |= new BinaryOperator(SysObject.ObjectIDPropertyName, p, BinaryOperatorType.Equal); } settings.LookupFilterCriteria = co; } } else if (Equals(column.Tag, ColUnboundMethodsFieldName)) //Методы { //Редактируем в другой форме e.Cancel = true; //if (string.IsNullOrEmpty(column.FieldName) || // string.IsNullOrEmpty(row.PmCode) || string.IsNullOrEmpty(row.OjectEntityCode) || string.IsNullOrEmpty(row.ObjectName)) //{ // e.Cancel = true; // return; //} //var settings = column.EditSettings as IConfiguratorSettingsBase; //if (settings != null) //{ // hascriteria = true; // var pmkeys = _vm.GetAllowedPmMethods(operationCode: column.FieldName, // objectEntityCode: row.OjectEntityCode, objectName: row.ObjectName); // var pms = // _vm.ItemsSource.Where( // p => p.PmMethodCodes != null && p.Id != row.Id && // p.PmCode == row.PmCode && p.OjectEntityCode == row.OjectEntityCode && // p.ObjectName == row.ObjectName) // .SelectMany(p => p.PmMethodCodes.Values) // .SelectMany(m => m.Cast<string>()) // .Distinct().ToArray(); // foreach (var p in pmkeys) // { // if (pms.Any(pm => pm.EqIgnoreCase(p))) // continue; // co |= new BinaryOperator("PMMETHODCODE", p, BinaryOperatorType.Equal); // } // settings.LookupFilterCriteria = co; //} } } finally { if (hascriteria) { if (ReferenceEquals(co, null)) { e.Cancel = true; } } PmGridControl.EndDataUpdate(); } }
private void TableView_ShowingEditor(object sender, ShowingEditorEventArgs e) { if(e.Column.FieldName == "IDCustomerGroup" && e.RowHandle != GridControl.NewItemRowHandle) { e.Cancel = true; } }
private void OnIsEditingAllowed(ShowingEditorEventArgs args) { args.Cancel = ((SampleData)args.Row).Value % 2 == 0; }
private void tableView1_ShowingEditor(object sender, ShowingEditorEventArgs e) { e.Cancel = !(gridControl1.CurrentItem as GridItem).AllowEdit; }