Explorar o código

Removed line of code that was causing errors when reloading columns of the StockForecast grid

Kenric Nugteren hai 10 meses
pai
achega
2064caa0ac

+ 8 - 4
inabox.wpf/DynamicGrid/DynamicGrid.cs

@@ -1096,7 +1096,14 @@ public abstract class DynamicGrid<T> : DynamicGrid, IDynamicGridUIComponentParen
                             MasterData.AddPage(table);
                             Dispatcher.Invoke(() =>
                             {
-                                ProcessData(new(idx, table.Rows.Count));
+                                try
+                                {
+                                    ProcessData(new(idx, table.Rows.Count));
+                                }
+                                catch(Exception e)
+                                {
+
+                                }
                             });
                         }
                     }
@@ -1109,9 +1116,6 @@ public abstract class DynamicGrid<T> : DynamicGrid, IDynamicGridUIComponentParen
             DoAfterRefresh();
             bRefreshing = false;
             IsReady = true;
-
-            Loading.BeginAnimation(Label.OpacityProperty, null);
-            Loading.Visibility = Visibility.Collapsed;
         }
     }
 

+ 1 - 1
inabox.wpf/DynamicGrid/UIComponent/DynamicGridGridUIComponent.cs

@@ -1207,7 +1207,7 @@ public class DynamicGridGridUIComponent<T> : IDynamicGridUIComponent<T>, IDynami
         // for no reason. I think perhaps the image columns were trying to refer to data that didn't exist anymore when calling DataGrid.Columns.Refresh(),
         // and thus some mega problems (perhaps even exceptions within Syncfusion) were occurring, and this seems to fix it.
         // I don't pretend to know why it works; this is probably the strangest problem I've ever come across.
-        DataGrid.ItemsSource = null;
+        //DataGrid.ItemsSource = null;
 
         DataGrid.Columns.Suspend();