Odd lock behavior after row/column drag

Posted by: kbj on 12 February 2018, 2:29 am EST

    • Post Options:
    • Link

    Posted 12 February 2018, 2:29 am EST

    With a sheet.Models.Data inherited form the DefaultSheetDataModel, if you drag a locked row, the cell locking in that row gets messed up. In this example:

    Imports FarPoint.Win.Spread

    Imports FarPoint.Win.Spread.Model

    Public Class Form1

    Private WithEvents wb As FpSpread

    Private WithEvents ws As SheetView

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load

    wb = New FpSpread

    wb.AllowRowMove = True

    ws = New SheetView

    ws.Models.Data = New myDataSheetDataModel 'comment out this line and example works

    ws.RowCount = 5

    ws.ColumnCount = 3

    ws.Cells(0, 0, 4, 2).LockBackColor = Color.PaleGoldenrod

    ws.Cells(2, 0, 2, 2).Locked = True

    ws.Cells(2, 0, 2, 2).Value = “Locked”

    ws.OperationMode = OperationMode.SingleSelect

    wb.Sheets.Add(ws)

    Controls.Add(wb)

    wb.Dock = DockStyle.Fill

    End Sub

    Private Sub RowDragMoveCompleted(sender As Object, e As DragMoveCompletedEventArgs) Handles wb.RowDragMoveCompleted

    For rowIndex = 0 To ws.RowCount - 1

    Debug.Print(rowIndex.ToString & “:” & ws.Cells(rowIndex, 0).Locked.ToString)

    Next

    End Sub

    End Class

    Public Class myDataSheetDataModel

    Inherits DefaultSheetDataModel

    End Class

    row 3 the locked row is dragged to row 4

    and the locking is wrong.

  • Posted 12 February 2018, 8:15 pm EST

    Hello,

    Thanks for the code.

    I am able to replicate the problem at our end. I have escalated this to the development team(tracking id 254443) and will revert you back once have any information from them.

    Thanks

    Mohit

  • Posted 30 September 2018, 5:58 pm EST

    Hello,

    Our developers have confirmed that it’s a bug of SPREAD and it will be fixed in our next V12 release which is expected in end of October.

    Thanks,

    Reeva

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels