FlexGrid for WinForms | ComponentOne
Styling and Appearance / Marquee Style
In This Topic
    Marquee Style
    In This Topic

    The term marquee refers to visually highlighting current grid cell or cell range using a border. FlexGrid allows you to set a marquee border through the MarqueeStyle property of the C1FlexGrid class. You can set value of this property using MarqueeBorderMode, which includes values CellRange and None. By default, the property is set to MarqueeBorderMode.None. When MarqueeStyle property is set to MarqueeBorderMode.CellRange, it highlights the current cell or selected range of cells with a solid black border. The following image illustrates use of the MarqueeStyle property:

    Flexgrid Marquee

    The below example code snippet illustrates MarqueeStyle property set to cellrange for highlighting selected cell or cell range in the FlexGrid control:

    CS
    Copy Code
    //Setting the Marquee property using the MarqueeBorderMode
    c1FlexGrid1.MarqueeStyle.BorderMode = MarqueeBorderMode.CellRange;
    

    Further, you can customize marquee border's width, color, padding, the padding color, and align the marquee border to either inside, center, or outside of the grid cell border. The following image shows changes in the width, color, padding, padding color, and border alignment for Marquee border:

    Marquee customization

    For example, the below code snippet illustrates changing width, color, padding color, padding, and alignment of border of the Marquee border with values 3px, Crimson, YellowGreen, 3px, and outside respectively.

    CS
    Copy Code
    //Setting the marquee property - border width to 3px, color to crimson, padding color to YellowGreen and the padding space as 3px.
    c1FlexGrid1.MarqueeStyle.Width = 3;
    c1FlexGrid1.MarqueeStyle.Color = Color.Crimson;
    c1FlexGrid1.MarqueeStyle.BackgroundPaddingColor = Color.YellowGreen;
    c1FlexGrid1.MarqueeStyle.BackgroundPadding = new Padding(3);
    c1FlexGrid1.MarqueeStyle.BorderAlign = BorderAlign.Outside;