What does Cellcheck do when cancelled

Posted by: cnoelle on 31 October 2024, 11:54 am EST

    • Post Options:
    • Link

    Posted 31 October 2024, 11:54 am EST

    Flexgrid 4.8.20241.657 in a winforms 4.8 program with one column with datatype = boolean.

    Shows checkboxes and lets them change.

    Public Class Form1
        Private Sub C1FlexGrid1_CellChecked(sender As Object, e As C1.Win.C1FlexGrid.RowColEventArgs) Handles C1FlexGrid1.CellChecked
            If e.Row Mod 2 = 0 Then
                e.Cancel = True
            End If
        End Sub
    End Class
    


    This does not do anything.

    How can I ignore the cellcheck, if i.e. there is an error or unwanted?

    Do I miss something?

    Regards

  • Posted 1 November 2024, 4:30 am EST

    Hi,

    you could handle the “ValidateEdit” event. Here, “e.Cancel” will work.

    Best regards

    Wolfgang

  • Posted 4 November 2024, 5:52 am EST

    Hello,

    The CellChecked event is triggered after the checkbox is checked or unchecked. Therefore, the Cancel property will not have any effect as the job has already been done.

    As per Wolfgang’s comment, you can use ValidateEdit event for this purpose. Please refer to the attached sample for implementation.

    Sample: FlexGrid_CancelCheck_VB.zip

    Regards,

    Uttkarsh.

    P.S.: Thank you, Wolfgang, for your input.

  • Posted 4 November 2024, 8:20 am EST

    Thanks guys, is working now

Need extra support?

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

Learn More

Forum Channels