How to change Highlight Style in C1flexgrid | WinForm

Posted by: agopwns on 20 April 2018, 2:45 am EST

    • Post Options:
    • Link

    Posted 20 April 2018, 2:45 am EST

    C1flexgrid | WinForm | C#

    I want to change the highlight Style.

    I use this code.

    
    this.Styles.Highlight.BackColor = Color.Red;
    this.Styles.Focus.BackColor = this.Styles.Highlight.BackColor;
    
    

    But it’s only ‘Focus.BackColor’ work.

    Doesn’t work ‘Highlight.BackColor’.

    What’s wrong this code?

  • Posted 20 April 2018, 7:16 am EST

    Hi agopwns,

    works for me, see attached sample ;-). Note that the highlight color will only be visible if you select multiple cells.

    FlexHighlight.zip

    Did you set a VisualStyle to the flexgrid, or do you use C1Themes? Both might overwrite the highlight style.

    Best regards

    Wolfgang

  • Posted 22 April 2018, 6:57 pm EST

    Oh, I used VisualStyle.

    Thank you for your answer : )

  • Posted 23 April 2018, 3:04 am EST

    Hi,

    in this situation, you might change the “Highlight” style after setting the VisualStyle. Probably, you will have to do this in code, e.g. in the “OnLoad” override.

    Best regards

    Wolfgang

Need extra support?

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

Learn More

Forum Channels