|
@@ -3390,7 +3390,7 @@ namespace InABox.DynamicGrid
|
|
|
|
|
|
private static string DragFormat => typeof(DynamicGridDragFormat).FullName ?? "";
|
|
|
|
|
|
- protected virtual void OnDragEnd(Type entity, CoreTable table)
|
|
|
+ protected virtual void OnDragEnd(Type entity, CoreTable table, DragEventArgs e)
|
|
|
{
|
|
|
Logger.Send(LogType.Information,"","OnDragEnd");
|
|
|
}
|
|
@@ -3416,7 +3416,7 @@ namespace InABox.DynamicGrid
|
|
|
{
|
|
|
if (column is DataColumn dataColumn)
|
|
|
{
|
|
|
- table.Columns.Add(new CoreColumn { ColumnName = dataColumn.ColumnName, DataType = dataColumn.DataType });
|
|
|
+ table.Columns.Add(new CoreColumn { ColumnName = dataColumn.ColumnName.Replace('_', '.'), DataType = dataColumn.DataType });
|
|
|
}
|
|
|
}
|
|
|
foreach (var row in data.Table.Rows)
|
|
@@ -3429,28 +3429,29 @@ namespace InABox.DynamicGrid
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- OnDragEnd(data.Entity, table);
|
|
|
+ OnDragEnd(data.Entity, table, e);
|
|
|
DoChanged();
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- protected void DragTable(Type entity, CoreTable table)
|
|
|
+ protected DragDropEffects DragTable(Type entity, CoreTable table)
|
|
|
{
|
|
|
Logger.Send(LogType.Information,"","DragTable");
|
|
|
var data = new DataObject();
|
|
|
data.SetData(DragFormat, new DynamicGridDragFormat(table.ToDataTable(), entity));
|
|
|
- DragDrop.DoDragDrop(this, data, DragDropEffects.All);
|
|
|
+ var effect = DragDrop.DoDragDrop(this, data, DragDropEffects.All);
|
|
|
+ return effect;
|
|
|
}
|
|
|
|
|
|
- protected virtual void OnRowsDragStart(CoreRow[] rows)
|
|
|
+ protected virtual DragDropEffects OnRowsDragStart(CoreRow[] rows)
|
|
|
{
|
|
|
Logger.Send(LogType.Information,"","OnRowsDragStart");
|
|
|
var table = new CoreTable();
|
|
|
table.LoadColumns(Data.Columns);
|
|
|
table.LoadRows(rows);
|
|
|
- DragTable(typeof(T), table);
|
|
|
+ return DragTable(typeof(T), table);
|
|
|
}
|
|
|
|
|
|
private void RowDragDropController_DragStart(object? sender, GridRowDragStartEventArgs e)
|