Browse Source

Fixed UpdateCell for direct edit when doing linked properties

Kenric Nugteren 1 year ago
parent
commit
037b52c9cd
2 changed files with 6 additions and 3 deletions
  1. 0 3
      InABox.Core/Filter.cs
  2. 6 0
      inabox.wpf/DynamicGrid/DynamicGrid.cs

+ 0 - 3
InABox.Core/Filter.cs

@@ -316,9 +316,6 @@ namespace InABox.Core
 
         string AsOData();
 
-        void SerializeBinary(CoreBinaryWriter writer);
-        void DeserializeBinary(CoreBinaryReader reader);
-
         IEnumerable<string> ColumnNames();
 
         public delegate object? ConvertCustomValueFunction(IFilter filter, CustomFilterValue value);

+ 6 - 0
inabox.wpf/DynamicGrid/DynamicGrid.cs

@@ -1042,6 +1042,12 @@ namespace InABox.DynamicGrid
             if (table is null) return;
 
             var colno = table.Columns.IndexOf(datacolname);
+            if (colno < 0)
+            {
+                // This column is not in the list. Because of linked properties, a single lookup change can cause a cascade of updates,
+                // many of which are likely unnecessary; hence, we shall ignore any which are unnecessary.
+                return;
+            }
             var corecol = Data.Columns[colno].ColumnName;
             var corerow = Data.Rows[row];
             corerow[corecol] = value;