Selaa lähdekoodia

Fix to bug with sequencing

Kenric Nugteren 7 kuukautta sitten
vanhempi
commit
b1cae8d484

+ 2 - 2
inabox.wpf/DynamicGrid/DynamicGrid.cs

@@ -2140,7 +2140,7 @@ public abstract class DynamicGrid<T> : DynamicGrid, IDynamicGridUIComponentParen
     {
         if (!Options.ReorderRows || !IsSequenced) return;
 
-        var items = rows.ToArray<T>();
+        var items = LoadItems(rows);
         if (isCopy)
         {
             if (!BeforeCopy(items))
@@ -2155,7 +2155,7 @@ public abstract class DynamicGrid<T> : DynamicGrid, IDynamicGridUIComponentParen
 
         var postRows = Data.Rows.Where(r => !rows.Contains(r) && r.Get<ISequenceable, long>(x => x.Sequence) >= sequence);
 
-        var updates = items.Concat(postRows.ToObjects<T>()).ToArray();
+        var updates = items.Concatenate(LoadItems(postRows.ToArray()));
         foreach (var update in updates)
         {
             ((ISequenceable)update).Sequence = sequence;

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

@@ -179,6 +179,7 @@ public class DynamicGridGridUIComponent<T> : IDynamicGridUIComponent<T>, IDynami
             return null;
         });
         DataGrid.RowDropIndicatorMode = DropIndicatorMode.Line;
+        DataGrid.RowDragDropController ??= new GridRowDragDropController();
         
         DataGrid.CurrentCellBorderThickness = new Thickness(0);
         DataGrid.AllowFiltering = false;