FlexGrid - Highlight Forecolor issue

Posted by: andrea.davoli on 13 October 2021, 10:52 am EST

    • Post Options:
    • Link

    Posted 13 October 2021, 10:52 am EST - Updated 3 October 2022, 10:56 pm EST

    Hello,

    my issue appeared when I changed DLLs of WinForms Edition from 2.0 to 4.0.

    Before, I could change the BackColor of an highlighted row of a FlexGrid without change also the ForeColor.

    In this example, with DLLs 2.0, the columns with ForeColor black stays black and green stays green.

    After I changed DLLs in 4.0 it change the ForeColor. I can change the ForeColor (in Propriety->Styles->Highlight->ForeColor) but in any case I can set only one color for the whole row. It can’t mantein already present colors.

    Someone had the same issues or knows hot to fix it?

    Thank you.

    David

  • Posted 14 October 2021, 12:08 am EST

    Hello David,

    The Column styles have the least preference than other existing styles like Highlight, Row, Cell so that Highlight styles are overriding the Column style ForeColor.

    As a workaround, you can assign custom styles to the current row to achieve the same behavior.

    The 2.0 and 4.0 builds show the same behavior at our end. Can you please let us know the build version which with it was working for you?

    Regards,

    Prabhat Sharma.

    ForeColorDemoGrid.zip

  • Posted 14 October 2021, 4:51 am EST

    Hello Prabhat, thank you for your answer.

    I always used 2.0 DLLs. I updated the version 2020v2 to the 2021v2 and it continued to work.

    Then when I swiched to 4.0 objects starts to behave differently.

    I know how to change the ForeColor of each cell, I wanted to avoid to do with a proper function every time I highlight a row.

    In our software every cell have a different ForeColor based on some criteria and is heavy to launch a function every time a row is selected, before (with DLLs 2.0) it kept each ForeColor even if the row was highlighted.

  • Posted 19 October 2021, 7:13 am EST

    Hello,

    Can you please check our attached sample with 2.0 FW builds and let us whether you are getting the expected behavior with it.

    If you doing anything else then please modify the attached sample or share your stripped-down sample replicating the issue.

    Note: Please comment on the SelChange event handler.

    Regards,

    Prabhat Sharma.

Need extra support?

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

Learn More

Forum Channels