Index: DamClients/DamUI/trunk/src/Dam/Forms/DamContext.cs =================================================================== diff -u -r6224 -r6271 --- DamClients/DamUI/trunk/src/Dam/Forms/DamContext.cs (.../DamContext.cs) (revision 6224) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamContext.cs (.../DamContext.cs) (revision 6271) @@ -23,7 +23,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Linq.Expressions; using Deltares.Dam.Data; using Deltares.Geotechnics; using Deltares.Geotechnics.Soils; @@ -32,6 +31,9 @@ using Deltares.Standard.Forms; using Deltares.Standard.Forms.DExpress; using Deltares.Standard.Reflection; +using DevExpress.Utils.Menu; +using DevExpress.XtraTreeList; +using DevExpress.XtraTreeList.Menu; namespace Deltares.Dam.Forms { @@ -44,7 +46,7 @@ } public bool Wti { get; set; } = true; - + /// /// Method indicating a visibility override value for a given instance object. /// @@ -99,6 +101,13 @@ } } + if (source is WaterBoardTreeView waterBoardTreeView) + { + TreeList treeList = waterBoardTreeView.TreeList; + treeList.PopupMenuShowing += WaterBoardTreeListPopupMenuShowing; + } + + if (source is VisualValidationResult) { // Make sure that for DAM, all repairers are not used. @@ -392,5 +401,26 @@ return base.GetFormat(type, source, member); } + + private static void WaterBoardTreeListPopupMenuShowing(object sender, PopupMenuShowingEventArgs e) + { + if (e.Menu is TreeListColumnMenu columnMenu) + { + DXMenuItem showAutoFilterRowItem = columnMenu.Items + .FirstOrDefault(item => item.Caption == "Show Auto Filter Row"); + if (showAutoFilterRowItem != null) + { + showAutoFilterRowItem.Visible = false; + } + + DXMenuItem filterEditorItem = columnMenu.Items + .FirstOrDefault(item => item.Caption == "Filter Editor..."); + if (filterEditorItem != null) + { + filterEditorItem.Visible = false; + } + } + } + } } \ No newline at end of file