Replied 8 September 2017, 1:06 pm EST
Thanks for the reply. MoveContent already does equal true in ColumnDragMove event.
If the problem was only with my DataModel, why would the column headers (which is still completely in the control of FpSpread code) as well as cell types not be moving correctly? Also my tracking calls to my data model's IRangeSupport interface, FpSpread does not seem to be remapping columns between viewport and datamodel. FpSpread specifically instructs the data model to move columns around.
My test is moving Column E (#4) to between Columns G and H.
If I step into disassembly code, I see FpSpread code calling a move column method (not sure of exact name) with fromColumn=4 and toColumn=6. This is what I expect.
The calls to my data model's IRangeSupport implementation are as follows:
IRangeSupport.AddColumns(int column=7, int columnCount=1) (conflicts with documentation that says insert AFTER column).
IRangeSupport.Move(int fromRow=-1, int fromColumn=4, int toRow=-1, int toColumn=7, int rowCount=-1, int columnCount=1)
IRangeSupport.Move(int fromRow=-1, int fromColumn=5, int toRow=-1, int toColumn=4, int rowCount=-1, int columnCount=2)
IRangeSupport.RemoveColumns(int column=6, int columnCount=1)
Is the problem with the first IRangeSupport.AddColumns()? According to documentation, I should be inserting AFTER column 7, not before. That may be what your code is doing. If your insert added after column 7, then deleted column 6, I would see an empty header / non celltype formatted column when all was said and done. I cannot insert after column 7 (a new column 8) in my example, because I would never copy anything new into it according to the parameters in IRangeSupport.Move() calls.
Here is my class inheritance:
</FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>DataModelZoom</FONT><FONT size=2> : </FONT><FONT color=#008080 size=2>BaseSheetDataModel</FONT><FONT size=2>, </FONT><FONT color=#008080 size=2>IRangeSupport</FONT><FONT size=2>, </FONT><FONT color=#008080 size=2>INonEmptyCells, </FONT><FONT color=#008080 size=2>ISpreadTranspose </FONT>
<FONT color=#008080 size=2>ISpreadTranspose is a special interface for my app..