Viewport problem

Posted by: sameek on 8 September 2017, 1:36 pm EST

  • Posted 8 September 2017, 1:36 pm EST

    I am using Spread for WinForms 3.0.2005.2005. 

    I am having a problem if I am in edit mode in a cell and then double click on a viewport splitterbar to get rid of it, the app blows up with an error that occured somewhere in the spread code that the error says "Must be between 0 and 0. Parameter name: rowViewportIndex ActualValue was 1. 

    If you are not in edit mode then there is no problem. But if you are in edit mode and double click on the viewport bar then you will get an error.  I was wondering if there was a way to determine that you are double clicking on the bar then you could set edit mode off?

  • Replied 8 September 2017, 1:36 pm EST


    I tested this with the latest maintenance release (3.0.2009) and was not able to reproduce the issue. I would suggest getting this release to test. If you are still having issues, could you post a small zipped project reproducing this issue for us to debug?

    In the MouseDoubleClick event you can get the HitTestInformation from the Spread to determine where the double click occured.

  • Replied 8 September 2017, 1:36 pm EST

    They added the HitTest to version 3.  You can try that.
  • Replied 8 September 2017, 1:36 pm EST

    For some reason my Spread MouseDoubleClick event is not firing?

  • Replied 8 September 2017, 1:36 pm EST


    You are correct. The MouseDown event with the e.Clicks parameter set to 2 is firing. You can use that event.

    Private Sub FpSpread1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FpSpread1.MouseDown

    Dim htInfo As FarPoint.Win.Spread.HitTestInformation

    If e.Clicks = 2 Then

    htInfo = FpSpread1.HitTest(e.X, e.Y)

    If htInfo.Type = FarPoint.Win.Spread.HitTestType.RowSplitBar Then


    End If

    End If

    End Sub

    End Class

Need extra support?

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

Learn More

Forum Channels