CheckBox in Unbound FlexGrid

Posted by: jimt on 3 June 2021, 3:23 pm EST

    • Post Options:
    • Link

    Posted 3 June 2021, 3:23 pm EST

    W10, 64 bit, VS2019, C1FlexGrid V4.6

    I am using an unbound C1FlexGrid (great component) and would like to programmatically change the state of a check box. No problem changing the back ground color like this:

    MyForm.FlexGrid.SetCellStyle(row, column, styleRed);

    but after I set the background color I would like to change the state of the existing check box in the same cell like this but it doesn’t work:

    MyForm.FlexGrid.SetCellCheck(row, column, CheckEnum.Checked);

    When I change the state of the check box I would like the MouseClick event to execute. With the SetCellCheck statement, the MouseClick event does not fire and the state of the check box is unchanged.

    How do I accomplish this?

    Jim

  • Posted 4 June 2021, 4:10 am EST

    Hi Jim,

    We do not face the issue at our end in changing the style and checked state of the same cell via code. Please see the attached sample implementing the same.

    MouseClick event will only fire when the user performs some operation with the mouse. If you want to perform any specific operation on checked change via code then you need to do it after changing the checked state yourself.

    If you still face any issues then please modify the sample accordingly and also let us know the version that you are using.

    Regards,

    Prabhat Sharma.

    flex_check_unbound.zip

Need extra support?

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

Learn More

Forum Channels