FlexGrid: CellbackColor

Posted by: andreas.kren on 26 January 2019, 12:22 pm EST

    • Post Options:
    • Link

    Posted 26 January 2019, 12:22 pm EST - Updated 4 October 2022, 1:32 am EST

    Hi, while the style concept seems nice in some scenarios I cant see how i can easily solve a problem like seen in my attached jpf. I have a grid with thousands of rows, each row has -lets say- 3 cols representing a certain color which the user can set in a dialog.

    I now have to handle tousands x 3 styles?!

  • Posted 28 January 2019, 3:26 am EST

    Hello Andreas,

    As per my understanding, you want to set the different back color each cell of 3 columns of rows as per user selection in the dialog at runtime.

    If my understanding is correct then yes, you have to handle thousands * 3 cellstyles for each cell.

    Please explain If I am missing something.

    Thanks.

  • Posted 28 January 2019, 5:01 am EST

    Hi Andreas,

    to avoid creating all those styles yourself, you could use my “Stylehandler” helper class which is attached to this reply: https://www.grapecity.com/en/forums/winforms-edition/flexgrid-font-size#hi-tobyattached-is-a-sampl

    Hope this helps

    Wolfgang

  • Posted 11 February 2019, 3:19 pm EST

    No you do not miss sth. For my scenario the style concept just seems not “right” …

  • Posted 11 February 2019, 3:32 pm EST

    Hi Wolfgang, great stuff, Danke, herst.

    After c-thru of the sources:

    !!DANKE!!

Need extra support?

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

Learn More

Forum Channels