Hyperlink cell (empty Link property) launches Web Browser

Posted by: echernyak on 8 September 2017, 2:43 pm EST

  • Posted 8 September 2017, 2:43 pm EST

    We switched to version 5.0.3518.2008. When running SpreadWinDemoVB sample app (VS2008/2010) and clicking on the cell (Go to Cell B6) it launches Web Browser with invalid reference http:\\\  (Link property for cell type is an empty string). This worked fine for prior versions  3.x, 4.x we used before.


    Thank you

  • Replied 8 September 2017, 2:43 pm EST

    Hello,

    Yes, this is an intended behavior. This is the changed in this version of Spread from previous versions. When there is an invalid link now it fires the Error event with EditError.InvalidHyperlink.  If you
    set the e.Cancel flag in the Error event handler to true, it will cancel
    processing of the invalid link; otherwise, it will fire the EditError
    event (which does not support cancelling) and open the invalid link. So you need to add these extra lines of code in your project in order to handle the behavior for invalid link.

    Private Sub FpSpread1_Error(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ErrorEventArgs) Handles FpSpread1.Error

            If e.EditError = FarPoint.Win.Spread.EditError.InvalidHyperlink Then

                e.Cancel = True

            End If

    End Sub

     

    Thanks,

     

  • Replied 8 September 2017, 2:43 pm EST

    Hello,


    unfortunately this workaround didn't work for me. I tried to apply in SpreadWinDemoVB app(sample app which comes with a component). CellTypes form/HyperlInk page. If I click on cell Goto Cell B6 Error event doesn't occur and Web browser is being launched.


    Thank you

  • Replied 8 September 2017, 2:43 pm EST

    Hello,

    I created a new sample application  where I found that code  is working fine, fpSpread1_Error event does fire on click of hyperlink if it is a blank url. Your observations are correct it does not seem to be working with SpreadWinDemo sample. I will investigate this further that why the event is not fired and will update you.

     

    Thanks,

     

  • Replied 8 September 2017, 2:43 pm EST

    Hi,

    I am told it is a bug (99922615) that is pending.  It will be fixed in the next release of Spread.NET 6 (end of this month/early next month).  Sorry for the inconvenience.

    In another thread I have posted a sample custom hyperlink cell type for making links to cells that gets around this problem:

    http://www.clubfarpoint.com/Forums/forums/thread/95379.aspx

  • Replied 8 September 2017, 2:43 pm EST

    Hello:


    I just upgraded to Spread.NET 6.0 (6.0.3501.2008) and this problem still exists. Is incident 99922615 (you wer referring to) still pending?


    Thank you


     

  • Replied 8 September 2017, 2:43 pm EST

    Hello,

    Next build of Spread 6 .Net is scheduled to be released next week.

     

    Thanks,

     

     

Need extra support?

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

Learn More

Forum Channels