Hide Cell Border Lines in FlexGrid

Posted by: jallen on 10 October 2019, 1:09 am EST

  • Posted 10 October 2019, 1:09 am EST

    Is there any way to show/hide individual lines in a cell's border (left, right, top, bottom)? I need to remove the vertical line between two columns as in the attachment, but I do not want to remove the horizontal line separating the header row. I am using ComponentOne Studio 20161.1.25
  • Replied 10 October 2019, 2:08 am EST

    There are Border parameters in the Style you set for the cell...
  • Replied 10 October 2019, 3:10 pm EST


    You can show/hide vertical and horizontal border lines by using the Direction property Cell Border class.

    c1FlexGrid1.Cols[colIndex].Style.Border.Direction = BorderDirEnum.Horizontal;

    I am attaching a sample demonstrating you requirements, please have a look.

    Prabhat Sharma.

  • Replied 15 October 2019, 12:38 am EST

    Is there a way to remove the line in row zero as well?
  • Marked as Answer

    Replied 15 October 2019, 2:07 pm EST


    Use the code snippet given below to remove the vertical line from row 0 :

    CellStyle cs = c1FlexGrid1.Styles.Add("BorderStyle");
    cs.Border.Direction = BorderDirEnum.Horizontal;
    c1FlexGrid1.SetCellStyle(0, 1, cs);

    If you need any other help, please let me know.

    Prabhat Sharma.
  • Replied 15 October 2019, 11:50 pm EST

Need extra support?

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

Learn More

Forum Channels