Adding validate event handler for childsheet

Posted by: tosch on 8 September 2017, 1:19 pm EST

  • Posted 8 September 2017, 1:19 pm EST

    I have tried to add a validate handler to check a cell in a childsheet.

    This fails on the line '-->' since fpOrder.EditingControl is nothing. Any other ideas on how to add a validate event handler for childsheets?


        Private Sub fpOrders_EditModeOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles fpOrders.EditModeOn
            Dim sv As SheetView = CType(sender, FarPoint.Win.Spread.FpSpread).GetRootWorkbook().GetActiveWorkbook().GetSheetView

            If sv.GetType Is GetType(KstView) Then
                If sv.ActiveColumnIndex = KstView.COL_FROM Then
    -->                AddHandler fpOrders.EditingControl.Validating, AddressOf Validate_From
                End If
            End If

        End Sub

  • Replied 8 September 2017, 1:19 pm EST

    See if using the following will do the trick...

    AddHandler FpSpread1.GetRootWorkbook.GetActiveWorkbook.EditingControl.Validating, AddressOf Editor_Validating

  • Replied 8 September 2017, 1:19 pm EST

    Yes, this has worked fine.


    Thanks for your help

Need extra support?

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

Learn More

Forum Channels