|
@@ -200,7 +200,6 @@ public abstract class DynamicGrid<T> : DynamicGrid, IDynamicGridUIComponentParen
|
|
|
HiddenColumns = new HiddenColumnsList();
|
|
|
|
|
|
drag = new DynamicImageColumn(InABox.Wpf.Resources.drag.AsBitmapImage()) { Position = DynamicActionColumnPosition.Start };
|
|
|
- ActionColumns.Add(drag);
|
|
|
if (typeof(T).IsAssignableTo(typeof(ISequenceable)))
|
|
|
{
|
|
|
HiddenColumns.Add(x => (x as ISequenceable)!.Sequence);
|
|
@@ -696,6 +695,17 @@ public abstract class DynamicGrid<T> : DynamicGrid, IDynamicGridUIComponentParen
|
|
|
if (drag is not null)
|
|
|
{
|
|
|
var hasSequence = drag.Position == DynamicActionColumnPosition.Start;
|
|
|
+ if (Options.ReorderRows)
|
|
|
+ {
|
|
|
+ if (!ActionColumns.Contains(drag))
|
|
|
+ {
|
|
|
+ ActionColumns.Insert(0, drag);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ActionColumns.Remove(drag);
|
|
|
+ }
|
|
|
if(hasSequence != Options.ReorderRows)
|
|
|
{
|
|
|
drag.Position = Options.ReorderRows ? DynamicActionColumnPosition.Start : DynamicActionColumnPosition.Hidden;
|