Hide Cell Border Lines in FlexGrid

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

    • Post Options:
    • Link

    Posted 10 October 2019, 10:09 am EST - Updated 4 October 2022, 12:39 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

  • Posted 10 October 2019, 11:08 am EST

    There are Border parameters in the Style you set for the cell…

  • Posted 11 October 2019, 12:10 am EST - Updated 4 October 2022, 12:39 am EST

    Hello,

    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.

    Regards,

    Prabhat Sharma.

    FlexGridTest.zip

  • Posted 15 October 2019, 9:38 am EST - Updated 4 October 2022, 12:39 am EST

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

  • Posted 15 October 2019, 11:07 pm EST

    Hello,

    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.

    Regards,

    Prabhat Sharma.

  • Posted 16 October 2019, 8:50 am EST

    Thanks!

Need extra support?

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

Learn More

Forum Channels